Forum Discussion

shb's avatar
shb
Frequent Visitor
8 years ago
Solved

Streaming Dataset - Latest value for each category

Hi,   I have a streaming dataset (e.g. real time temperature data) in Power BI via Stream Analytics. I have a category field called RoomName in that dataset (e.g. kitchen, bedroom) which allows me ...
  • Eric_Zhang's avatar
    8 years ago

    shb wrote:

    Hi,

     

    I have a streaming dataset (e.g. real time temperature data) in Power BI via Stream Analytics. I have a category field called RoomName in that dataset (e.g. kitchen, bedroom) which allows me to see real-time temperature for each room. I want to see the latest temperature value for each room on a real-time basis in the following format:

     

    Room Temperature Time
    Kitchen 25 20/09/2017 17:12:30
    Bedroom 23 20/09/2017 17:12:29
    Lounge 24 20/09/2017 17:12:28

      

    Could you please help how can I build the above data from the dataset? I have tried TOP 1 filtering based on the temperature value by latest time but that only gives me latest temperature value which in the above case is Kitchen temperature. I don't know how can I break that down by category. Any help will be appreciated. Thanks


    shb

    So you're trying to create a report in Power BI desktop connecting to a streaminddataset? If so, create two measures instead of using the Temperature and time column.

    latest Time = MAX(RealTimeData[Time])

    Latest Temperature = MAXX(FILTER(RealTimeData,RealTimeData[Time]=[latest Time]),RealTimeData[Temperature])