Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Team,
I want to calculate difference in minutes for each one hour.
If an employee logs in at 8:30 and logs out at 11:30, we want to calculate the time spent for each hourly interval. Here's how it should look:
For the 8-9 interval: 30 minutes
For the 9-10 interval: 60 minutes
For the 10-11 interval: 60 minutes
For the 11-12 interval: 30 minutes (because the logout time is at 11:30)
Sample data
Emp Id | Emp Name | Job Title | Log In Time | Log Out Time | Dif in min | HourlyInterval |
123 | Hari | Manager | 5/2/2024 8:25 | 5/2/2024 11:00 | 155 | 08-09 |
123 | Hari | Manager | 5/2/2024 8:20 | 5/2/2024 8:25 | 5 | 08-09 |
123 | Hari | Manager | 5/2/2024 11:34 | 5/2/2024 11:49 | 15 | 11-12 |
123 | Hari | Manager | 5/2/2024 11:17 | 5/2/2024 11:32 | 15 | 11-12 |
For record #1:
Please provide expected result using the sample data.
Proud to be a Super User!
Business requirement is to track how many hours he was in online. And I am not expecting in the row I am adding this in matrix visual
I asked because you mentioned that "we want to calculate the time spent for each hourly interval" which I assumed you wanted to show each interval as a row.
Proud to be a Super User!
I tried with this dax but not getting expected result
User | Count |
---|---|
91 | |
73 | |
68 | |
63 | |
55 |
User | Count |
---|---|
96 | |
89 | |
73 | |
61 | |
58 |