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.