This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I am looking for a formula to figure out how many hours an employee worked worked per day i have a date column, a start time column and an end time column my time columns show hours and minutes and if its am or pm. Not sure what formula to use to find hours per day
Solved! Go to Solution.
Hello @jbenson ,
In power query, you can use the function Duration.Hours() to find the time difference in hours between two given times. Sample is below :
In DAX, you can compute the difference between start and end times and then pass that in the DATEDIFF function to get the hours worked. Since there is no date part when you subtract the times, Power BI defaults to 30/12/1899 as the date, which is why I've subtracted the time difference from 30/12/1899 midnight to get the hours value.
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos!😊
Hello @jbenson ,
In power query, you can use the function Duration.Hours() to find the time difference in hours between two given times. Sample is below :
In DAX, you can compute the difference between start and end times and then pass that in the DATEDIFF function to get the hours worked. Since there is no date part when you subtract the times, Power BI defaults to 30/12/1899 as the date, which is why I've subtracted the time difference from 30/12/1899 midnight to get the hours value.
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos!😊
That worked!
That's great @jbenson . Happy to help!
Please mark this answer as the solution to help others as well!
Really appreciate your kudos!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 26 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 36 | |
| 32 | |
| 25 | |
| 23 |