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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
wicker
Frequent Visitor

Difference beetween date and future date on the same user_id

Hello!

I need to calculate time intervals beetween rows with the same user_id.

For example:

for 1st row value is 23:42 (diiference between dates in 4th and 1st rows)

for 4th row value is 5:49 (diiference between dates in 5th and 4th rows) etc

 

1 ACCEPTED SOLUTION
wicker
Frequent Visitor

Do it myself 🙂

 

CALCULATE(MIN([datetime]); FILTER('export ONLINE'; EARLIER([user_id]) = [user_id] && EARLIER([datetime]) < [datetime])) - 'export ONLINE'[datetime])

View solution in original post

2 REPLIES 2
wicker
Frequent Visitor

Do it myself 🙂

 

CALCULATE(MIN([datetime]); FILTER('export ONLINE'; EARLIER([user_id]) = [user_id] && EARLIER([datetime]) < [datetime])) - 'export ONLINE'[datetime])

Hi @wicker,

Congratulations, you resolved your issue by yourself, please mark your reply as answer, so more people will benefit from here. Thanks for understanding.

Best Regards,
Angelia

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.