Forum Discussion
Calc To Include Saturday Working Hours
11 Replies
- Stachu
Community Champion
Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).
Column1 Column2 A 1 B 2.5 This is a calculated column, correct?
- rogerthat
Helper I
Stachu - correct, its a calculated column.
MONDAY THRU FRIDAY- 6:00AM TO 6:00P
SATURDAY- 6:00A TO 5:00PStart (DATETIME) End (DATETIME) Expected Working Hours 10/9/2021 4:00:00 PM 10/11/2021 8:00:00 AM 3 10/23/2021 4:00:00 PM 10/23/2021 6:00:00 PM 1 10/29/2021 5:00:00 PM 10/30/2021 8:00:00 AM 3 - Stachu
Community Champion
can you add sample that would have holiday day in? or in such case there wouldn't be any entries overlapping with the holidays?
- VahidDM
Super User
Hi rogerthat
Check my blog post about Calculating business hours using DAX and you can find the solution there:
https://www.vahiddm.com/post/calculating-business-hours-in-power-bi-using-dax
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/- VahidDM
Super User
Hi rogerthat
you can modify the code and add the SATURDAY condition
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/