Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |