MergenHub Envest
Home/Docs/Integrations

Power BI and Excel: step by step

Open Data Logger history and live values to Power BI and Excel with the OData v4 feed: access key, Power Query code, Tags / Current / History tables, range and filter, refresh in the Power BI service.

Logged history and live values from the Data Logger (historian) are opened to Power BI and Excel without setting up a separate database. MergenHub serves an OData v4 feed; Power BI and Excel read it with Power Query. The external tool connects with a read-only access key, not with a user name and password.

Before you start

NeededWhy
The tags are logged in a log groupHistory is read from the Data Logger log groups. A tag that is not logged has no history (its live value still appears in the Current table).
An administrator with the Server settings permissionThey create the access key.
The key owner has the Data Logger read permissionThe key reads the tags its owner can see; it cannot exceed the owner's permissions and resource access.
Power BI Desktop or Excel can reach MergenHub over the networkWith HTTPS off the key works only from the local network; unencrypted requests from the internet are rejected.

1. Create an access key

  1. On the Settings › Data Bridge home page press Open on the Power BI · Excel card (the Grafana / Power BI button on the Data Logger page brings you here too).
  2. Give the key a name (e.g. "Power BI production report") and pick how long it is valid; Create key.
  3. Copy the key right away: it is never shown again. It is filled into the example addresses and the Power Query code on the page.

The key only reads the /config/v1/analytics addresses with GET, cannot write anything, expires, and stops working the moment it is deleted. Keys are shared by the Grafana and Power BI pages; delete them from the key list on the same page.

2. Connect in Power BI Desktop

  1. Get Data → Blank query → Advanced Editor.
  2. Paste the ready-made Power Query (M) code from the page; the address and the key come filled in. The core of the code is:
OData.Feed("http://10.0.0.5:8090/config/v1/analytics/odata", null, [Headers = [Authorization = "Bearer mhkey_…"]])
  1. Confirm the query; three tables appear. Pick the ones you need and load them into the report.
TableContents
TagsTags with logged history and their groups
CurrentLive value, quality and time
HistoryHistory; each row is tag, time, value. The last 24 hours by default

3. Range and filter

  • For another range add to the address: …/odata/History?tags=Channel.Device.Flow&from=now-7d. Time may be unix ms, unix seconds, ISO 8601 (2026-11-17T08:00:00Z) or relative (now, now-6h, now-7d).
  • OData query: $top, $skip and a limited $filter (Tag eq '…', Time ge / gt / le / lt …). An unrecognised filter is rejected, never silently ignored.
  • Long ranges are thinned out to at most 10,000 points per tag.

4. Excel

The steps are the same in Excel: Get Data → Blank query → Advanced Editor, the same Power Query code. Load the table to the sheet; Refresh brings the current values.

5. Refresh in the Power BI service

If you publish the report to the Power BI service and want scheduled refresh, an on-premises data gateway is needed: the service reaches MergenHub on the local network through this gateway.

Common problems

SymptomCause and fix
Empty tableThe tag is not logged in a log group or there is no data in the range. Query it on the Data Logger page to check.
Credentials rejectedThe key was copied incompletely, has expired or was deleted. Create a new key and paste it into the code.
403The key is used for another address or its owner lacks the permission. Report keys cannot read these addresses and analytics keys cannot read reports.
Cannot connect from the internetHTTPS is off. Turn on HTTPS in Settings for outside access; see Publishing on a domain.

Related: Grafana · Historian (data logging) · Data Bridge · Manual: Grafana and Power BI