Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 82 | |
| 48 | |
| 36 | |
| 31 | |
| 29 |