Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
sirros_iot
Helper III
Helper III

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

2017-12-01 17.26.21.png

 

3 REPLIES 3
MattAllington
Community Champion
Community Champion

2 things

 

i suggest you split date and time in different columns. This will make the workbook a lot smaller. You should do this match in the query editori stead of dax. Watch my video here https://m.youtube.com/watch?v=xN2IRXQ2CvI



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

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
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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.