I have an ASA output that sends the GPS coordinates of some devices to a Power BI Live data stream.
The 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 01/19/2018 11:49:01
1 1,67890 2,55555 01/19/2018 11:49:13
2 1,33333 2,33333 01/19/2018 11:50:23
2 1,23222 2,44444 01/19/2018 11:50:54
I want to show the last device location on the map. I can use the measure to show the latest Lat and Lon from a specific device, for example:
GpsLonLast = CALCULATE(MAX('PowerBI'[lon]);FILTER('PowerBi';PowerBI[time]=[LastTime]))
Where LastTime is a measure to get the last time the device sent a message.
This works when shown in the table, however I cannot match these measures to manage the map in Power BI, it does not support measures or aggregates.
If I use the usual Lat / Lon and Device fields as the location and name in the map control, I get all the locations that were found on the devices. But this is not what I want, I only want the latest device location.
Please note that I use Azure Stream Analytics to transmit real-time data in Power BI, in Power BI it turns out as a push dataset, so I can not use my own modeling in Power BI.