Power BI and Excel — SCADA data in your report
Logged history and live values are opened to Power BI and Excel without setting up a separate database. The external tool connects with a read-only access key, not with a user name and password.
How does it work?
MergenHub serves an OData v4 feed: /config/v1/analytics/odata. Power BI and Excel read it with Power Query. There are three tables: Tags (tags with logged history), Current (live value, quality, time) and History (the last 24 hours by default). History is read from the Data Logger log groups.
Secure access
The key only reads the analytics addresses with GET, cannot write anything, expires and stops working the moment it is deleted. It cannot exceed its owner's Data Logger permission and resource access. With HTTPS off the key works only from the local network.
Your first Power BI report in five steps
The steps are the same in Power BI Desktop and Excel. An administrator with the Server settings permission creates the key.
- 01
Log the tags
The tags to report on must be logged in a log group on the Data Logger page: Power BI reads the history from there.
- 02
Create an access key
On the Settings › Data Bridge home page press Open on the Power BI · Excel card. Name the key, pick how long it is valid, Create key; copy it right away, it is never shown again.
- 03
Open a blank query
In Power BI Desktop or Excel: Get Data → Blank query → Advanced Editor.
- 04
Paste the Power Query code
Paste the ready-made code from the page; the key is already filled in:
OData.Feed("…/config/v1/analytics/odata", null, [Headers = [Authorization = "Bearer mhkey_…"]]) - 05
Pick the tables
Tags, Current and History appear. For another range add
History?tags=…&from=now-7dto the address.
What can be read?
Tags
Tags with logged history and their groups; address …/analytics/tags.
Current
Live value, quality and time.
History
Each row: tag, time, value. The last 24 hours if not given; long ranges are thinned out to at most 10,000 points per tag.
OData query
$top, $skip and a limited $filter (Tag eq, Time ge / gt / le / lt). An unrecognised filter is rejected, never silently ignored.
Power BI service
Scheduled refresh in the Power BI service needs an on-premises data gateway; Power BI Desktop and Excel connect directly.
Analytics key
Read-only, time-limited, invalid the moment it is deleted. Report keys cannot read these addresses and analytics keys cannot read reports.
MergenHub