Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)

I've got an ASA output which sends the GPS coordinates of some devices to a Power BI Live data stream.

Data from ASA to Power BI looks something like this:

Device    Lat        Lon        Time

1         1,12345    2,34567    19-1-2018 11:48:00

2         1,34567    2,66666    19-1-2018 11:49:01

1         1,67890    2,55555    19-1-2018 11:49:13

2         1,33333    2,33333    19-1-2018 11:50:23

2         1,23222    2,44444    19-1-2018 11:50:54

I want to show the latest location of the devices on a map. I can use a measure to show the latest Lat and Lon from a specific Device, like this:

GpsLonLast = CALCULATE(MAX('PowerBI'[lon]);FILTER('PowerBi';PowerBI[time]=[LastTime])) 

Where last time is a measure to receive the latest time that device sent a message.

This works, when shown in a table, however, I cannot map these measures to map control in Power BI, it does not support measures or aggregates.

If I use the plain Lat / Lon and Device fields as location and name on a map control I get all locations the devices were ever found. But that's not what I want, I want only the last location of the devices.

Note that I am using Azure Stream Analytics to send live data to Power BI, in Power BI this is received as a push dataset, so I cannot use custom Modeling in Power BI. 

1 Answer

0 votes
by (47.2k points)
  • It is not possible which you want exactly to do but you could use Power BI API directly to a push dataset instead of Azure Stream Analytics and post the GPS coordinates yourself to the API.

  • You can clear the table beforehand so you only end up with the latest values. Unfortunately, you cannot remove or update a single row, so you have to post the complete table each time. It’s a bit cumbersome, but it works. The performance hit of deleting all rows in the table and adding them again is not that big of a problem if there are a few items on your map.

  • We use this technique on some projects and it works quite fast. We only update the GPS coordinates every couple of minutes and only post to the API when they are changed.

Live location data from ASA to Power BI Map
Intellipaat-community
by (100 points)
Ashok i am also facing the same problem. so could you please let me know how to clear the table
now i am using MS FLow to Power bi
Any idea greatly appreciated. thanks a lot

Related questions

Browse Categories

...