How to send only the last value received from stream analytics to powerbi
Asked Answered
H

4

6

How can I send and keep only the last value sent from stream analytics to powerbi?

I am measuring temperatures per sensor and sending to an eventhub and then to stream analytics then I am sending that further to powerbi. But I donot want all values in a table in powerbi. I want just the last measured value to appear in powerbi.

The reason is that I want to show in a single tile just the last measured sensor value for one of the sensors. I was not able to find a way to that if I send all measurements from stream analytics to powerbi as there are no filters that let me select only the maximum of date time values for example.

How to do that?

Holarctic answered 20/5, 2015 at 13:22 Comment(1)
It would help if we could select Max for DateTime values as you can do for integer values in powerbiPersonify
C
5

We're looking at how to do this in a better way, but there's a pretty simple procedure for making this work:

Use the "Ask a question about the data on this dashboard" box (QnA) and use a question like the following: "Average speed in the last 10 seconds"

This will give you what you want.

HTH, -Lukasz

Signup: http://www.powerbi.com

Power BI Developer Blog: http://blogs.msdn.com/powerbidev

Developers: http://dev.powerbi.com

Support: http://support.powerbi.com

Ciel answered 12/6, 2015 at 18:5 Comment(0)
M
1

you can use MAX function to get latest timeseries value. For eg.

SELECT
    MAX(refTimeStamp) as time
INTO
    output
FROM
    input TimeStamp BY refTimeStamp
GROUP BY 
    TumblingWindow(minute, 3)

It will return latest time in last 3 minute window.

Matter answered 29/8, 2016 at 12:32 Comment(1)
Ref: azure.microsoft.com/en-in/documentation/articles/…Matter
S
0

That can be achieved by using the

LAST

Analytical function that is built in.

as an example usage

SELECT
       sensorId, 
       LAST(reading) OVER (PARTITION BY sensorId LIMIT DURATION(hour, 1) WHEN reading IS NOT NULL)
FROM input 

the above sample query is going to find most recent non-null sensor reading over an hour duration.

click here for more info on LAST Function.

Synonymize answered 29/10, 2015 at 9:50 Comment(0)
O
0

Another option is to use a slicer in the report and use it to slice datetime values. Also you can add filters to the reports to specify time.

However these will still be at the reports level, not the Dashboard.

enter image description here

Hope this helps.

Ownership answered 9/11, 2015 at 12:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.