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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SachinC
Helper V
Helper V

Report on time intervals

Hi,

I have a column with values date/time stamp:  dd/mm/yyyy hh:mm:ss.

I want to report on intervals (hh:mm:ss) between rows, i.e:-

 

 row 1:  06/05/2016 09:33:33

 row 2:  06/05/2016 09:36:35  0h 1m 2s

 row 3:  06/05/2016 09:37:38  0h 1m 3s

 

etc....

 

Thanks,

S

1 REPLY 1
Vicky_Song
Impactful Individual
Impactful Individual

Please follow steps below:

 

1). Sort that datetime column desc. 

2). Add an Index column. Click Edit Queries -> Add Column -> Add Index Column named Index.

3). Create a calculated column with. CreateTime column contains data with datetime type.

CustomCol = DATEDIFF((IF('Table'[Index] = 1,'Table'[CreateTime], LOOKUPVALUE('Table'[CreateTime],'Table'[Index],'Table'[Index]-1))),'Table'[CreateTime],minute)

 

Then you get the datetime difference in minutes. You can then create another calculated column to show the values with xxH xxMins format.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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