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
Anonymous
Not applicable

Calculate diff time based on different rows

Hi Guys,

 

is it possible to calculate the time diff based on different rows?

 

IDTime RegisterNamePlace of workStarting or finishing work?
17/1/21 8:03JohnHomeStarting
27/1/21 8:10AhbraHomeStarting
37/1/21 8:20ElisaHomeStarting
47/1/21 15:10ElisaHomeFinishing
57/1/21 16:00JohnHomeFinishing
67/1/21 13:00AbhraHomeFinishing
77/1/21 8:25JohnOfficeStarting
87/1/21 8:03ElisaHomeStarting
98/1/21 13:20JohnOfficeFinishing
108/1/21 13:03ElisaHomeFinishing

 

For example

 

I need to john how many hours John worked from home and from the office.

 

Thank you

 

 

1 ACCEPTED SOLUTION

This is quite hard in DAX. But I recorded a video a few years ago showing how you can do it in Power Query https://youtu.be/xN2IRXQ2CvI



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

On the same day, how can Elise have 2 starting points from Home (ID 3 and 8).  Please check your data.  Also, please maintain the same spelling of Ahbra.  Share data after thoroughly checking.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

This is quite hard in DAX. But I recorded a video a few years ago showing how you can do it in Power Query https://youtu.be/xN2IRXQ2CvI



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

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.