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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Help with Measure

Hi,

I need help from you guys for calculating the difference between two time stamps , below is as example of the

exact output that I need. Appreciate your help !

 

IDTime ReceivedActionExpected Time Difference O/P
12110/9/2017 6:00In 
12110/9/2017 6:30Out30
12110/9/2017 6:50In 
12110/9/2017 7:00Out10
12110/9/2017 7:10In 
12110/9/2017 7:30Out20
12110/9/2017 7:32In 
12110/9/2017 7:43Out11
12110/9/2017 7:47In 
12110/9/2017 7:50Out3

 

Thanks,

1 ACCEPTED SOLUTION

Hi @Anonymous,

glad it worked out for you. For formatting the result, you may find these additional measures useful:

DiffMinutes = QUOTIENT([Diff], 60)

DiffSeconds = [Diff] - [DiffMinutes] * 60

DiffMinSec = [DiffMinutes] & "." & FORMAT([DiffSeconds],"00")

If all you need is the [DiffMinSec] you can fold it together as:

DiffMinSec = QUOTIENT([Diff], 60) & "." & FORMAT([Diff] - QUOTIENT([Diff], 60) * 60,"00")

View solution in original post

15 REPLIES 15

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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