If getting data from the web api, make sure the web api is configured. Version 19.1.1 or later releases are currently the only versions supporting this functionality. See:
In the following example is a call made to the web api and how to import it to power BI.
http://localhost:55235/api/v2/gettagdata?tags=localhost.Data%20Generation.Decay%200001&startTime=month&endTime=now
The first part of the call is specifying machine name and the port to access the web api service. The gettagdata is using a get call to get tags from data view localhost. The data set is Data Generation. The tag name is Decay 0001. The & is also asking for data from a start time of month (beginning of the month) to an end time of now. More information about calls and terms can be found in the web api help.
https://readapi.canarylabs.com/
Once the call returns in the web api, it can also be made from the Power BI app. To accomplish this:
- Open the Power BI app an click Get data
- Click other, web, and connect. This will promt for a url.
- Next insert the web api url call.
Dan is my Historian's name. If the Historian is local use localhost if connecting to a remote Historian use the PC name.
- After pressing the OK button, an image like this should appear.
- Clicking on data records will give a path with a list beside it.
- Now it is possible to make it to a table by clicking the upper left hand button selecting any delimeters and pressing OK.
You can also edit it after the fact in the query editer
- In this example we will split the timestamp and value by using the query editor by clicking on the split arrow.
- Then split the timestamp column to extract the time from the date.
- Column t.3 is of no use and will be deleted. The other columns are renamed. After editing is completed close and apply changes.
- Once the data has been uploaded to the visual tool it is ready to be used in layouts.