Location Data from ASA to Power BI Card

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.

+4
source share
4 answers

I don’t think it’s possible what you want to do.

API Power BI push Azure Stream Analytics GPS- API.
, . , , . , . , .
, . GPS- API, .

https://github.com/Microsoft/PowerBI-CSharp # API API.

+1

, .

:

= ADDCOLUMNS(SUMMARIZECOLUMNS(PowerBI[Device], "LastTime", MAX(PowerBI[Time])),
             "Lat", CALCULATE(MAX(PowerBI[Lat]),
                        FILTER(PowerBI, PowerBI[Time] = [LastTime])),
             "Lon", CALCULATE(MAX(PowerBI[Lon]),
                        FILTER(PowerBI, PowerBI[Time] = [LastTime])))

, , GPS- .

+1

"" ,

Latest Time per Device =
IF (
    [Time]
        = CALCULATE (
            MAX ( 'PowerBI'[Time] ),
            FILTER ( 'PowerBI', 'PowerBI'[Device] = EARLIER ( [Device] ) )
        ),
    "Is Latest Time per Device",
    "Other"
)

, . , " ". Lat Lon .

0

, , , , :

0

Source: https://habr.com/ru/post/1692426/


All Articles