Forum Discussion

sirros_iot's avatar
sirros_iot
Icon for Helper III rankHelper III
8 years ago

Difference about time between consecutive time rows to use it as a variable

Hello all!

First time here, sorry anything.

 

I need to discover the difference in seconds about two consecutive rows and then combine it with an average of time in an especific id. OBS: I can't use the PQ, so, no calculated columns. My data comes from a device( arduino).

 

This is my idea.

 

.Tempo concl = "Hole time in one execution request from a machine". 

.TimeAll = AVERAGE from the time.

 

VAR X = IF (( [.Tempo concl.] )) > (2 * 'RealTimeData'[.TimeAll]);
"Suspended";"Working")

RETURN
VAR X

 

Any help, Thanks.

All my data

In the right I have timestamp

 

3 Replies

    • sirros_iot's avatar
      sirros_iot
      Icon for Helper III rankHelper III
      Thank you for the answer. I will see what I can do, I can't use power query because I'm getting the data from the power BI online.
      • Anonymous's avatar
        Anonymous
        Not applicable

        HI sirros_iot,

         

        I'd like to suggest your to convert these time part to numeric(total second), then you can direct calculated on them. After calculation, you can transfer result to time format.

         

        Reference link:
        Aggregating Duration/Time

         

        Regards,

        Xiaoxin Sheng