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 August 31st. Request your voucher.

Reply
Angelo_M
Regular Visitor

Difference between current and preceding row, filtered

Hello everyone, 

I have this problem to solve.

I have to calculate the duration of engine running with this data:

 

Angelo_M_2-1699452527886.png

 

The dataset contains more events then only these two, so i have to filter to consider only this two events.
I was thinking to create a table with pivot data with columns SERIAL | DATE ON | DATE OFF | DURATION ENGINE ON

But i'm new in Power Query/Dax and i don't know how i can do.

 

Someone have suggestions? Thanks you!

 

 

1 REPLY 1
Rupak_bi
Super User
Super User

try this

Rupak_bi_1-1699527733237.pngRupak_bi_2-1699527770540.png

 



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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