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! Request now

Reply
Anonymous
Not applicable

Elapsed time from a single column defined by state

Hi all,

 

I'm having an issue creating a column/measure that tells me the elapsed time during 2 different data states. 

I have a single column with date/time, and another with a detected state: "MOTION_DETECTED" and "NO_MOTION_DETECTED". 

 

Ideally, i'd like a column/measure that tells me the elapsed minutes from a motion has been detected, until it returns that no motion has been detected. Similarly, i would like a column/measure that tells me the elapsed time from no detected motion, until motion is detected. 

 

Any tips? Data sample can be seen below: 

Herdichek_0-1662550360241.png

 



1 ACCEPTED SOLUTION
Anonymous
Not applicable

Sorry for the late reply!

 

I found a solution to my problem by grouping the DeviceID together, and then indexing it by the timestamp. This guide was helpful in case others have a similar wish: 
https://radacad.com/power-query-transformation-pattern-convert-status-log-dates-table-to-start-and-e...

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Could you pls show what you want expected output reusult according your base data?

 

 

 

Best Regards

Lucien

Anonymous
Not applicable

Sorry for the late reply!

 

I found a solution to my problem by grouping the DeviceID together, and then indexing it by the timestamp. This guide was helpful in case others have a similar wish: 
https://radacad.com/power-query-transformation-pattern-convert-status-log-dates-table-to-start-and-e...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors