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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.