Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi there,
I have to build a dax measures to calculate the worked time of each employee. The challenge here is that the data is saved by a sequence of input that the employee saves his timesheet in the MS forms.
I have the table below:
And I need to build a dax formula for the following requirements:
By employee:
To achieve this I need the time diff from different rows, however, based on the employee name and the day.
Any way to achieve this easily in DAX without the need to change the structure of my table?
Thanks in advance.
Now the table to make easier the copy and paste
ID | Start time | End Time | Name | Place of work | Starting or finishing work? |
1 | 7/1/21 8:10 | 7/1/21 13:01 | John | Home | Starting |
2 | 7/1/21 8:12 | 7/1/21 13:10 | Ahbra | Home | Starting |
3 | 7/1/21 8:05 | 7/1/21 14:00 | Elisa | Home | Starting |
4 | 7/1/21 8:13 | 7/1/21 15:10 | Elisa | Home | Finishing |
5 | 7/1/21 8:00 | 7/1/21 16:00 | John | Home | Finishing |
6 | 7/1/21 8:45 | 7/1/21 13:00 | Abhra | Home | Finishing |
7 | 7/1/21 8:52 | 7/1/21 13:00 | John | Office | Starting |
8 | 7/1/21 8:48 | 7/1/21 13:00 | Elisa | Home | Starting |
9 | 8/1/21 8:03 | 8/1/21 13:20 | John | Office | Finishing |
10 | 8/1/21 8:46 | 8/1/21 13:03 | Elisa | Home | Finishing |
Solved! Go to Solution.
Hello fabinishi1207
Try this measure below
Hello fabinishi1207
Try this measure below
Hi Portrek,
Thanks for the feedback but unfortunately it didn't work as expected.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.