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.
Hi everyone,
I need to calculate the total minutes spent on working by each employee, by making the difference between a specific hour (08:30:00) and a column that contains the date and time they start working:
The new column MinutesOfWork would contain the difference in minutes between 08:30:00 of the day included in each row, and the hour reported on each row:
I tried to use DATEDIFF, but I don't know how to include the time as well as the date. How can I create it? Thank you so much.
Solved! Go to Solution.
Hi @mtrevisiol ,
Try to create a new column like below:
Minutes of work = HOUR('Table'[dateend]- FORMAT('Table'[dateend],"YYYY-MM-DD 08:30:00"))*60
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mtrevisiol ,
Try to create a new column like below:
Minutes of work = HOUR('Table'[dateend]- FORMAT('Table'[dateend],"YYYY-MM-DD 08:30:00"))*60
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@mtrevisiol You can add the time value by adding your date with + TIMEVALUE("8:30:00"). Alternatively you could just use subtraction and math like:
Minutes of work =
([DateEnd] - TRUNC([DateEnd])+ 8/24 + 30/24/60) * 60
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |