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
| Needed | Why |
|---|---|
| The tags are logged in a log group | History 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 permission | They create the access key. |
| The key owner has the Data Logger read permission | The 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 network | With HTTPS off the key works only from the local network; unencrypted requests from the internet are rejected. |
1. Create an access key
- 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).
- Give the key a name (e.g. "Power BI production report") and pick how long it is valid; Create key.
- 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
- Get Data → Blank query → Advanced Editor.
- 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_…"]])
- Confirm the query; three tables appear. Pick the ones you need and load them into the report.
| Table | Contents |
|---|---|
| Tags | Tags with logged history and their groups |
| Current | Live value, quality and time |
| History | History; 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,$skipand 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
| Symptom | Cause and fix |
|---|---|
| Empty table | The 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 rejected | The key was copied incompletely, has expired or was deleted. Create a new key and paste it into the code. |
| 403 | The 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 internet | HTTPS 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
MergenHub