Forum Discussion
michael_laan
6 years agoFrequent Visitor
Calculating Working Hours Between Business Hour Dates Excluding Weekends
I was have been trying to come up with a calculation for working hours between two dates, exlcuding weekends and non-working hours. Additionally the calculation needed to adjust the actual start and...
Greg_Deckler
Community Champion
6 years agoSo like this? https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Duration/m-p/481543#M182
michael_laan
6 years agoFrequent Visitor
Thanks, Greg!
I used this edit from your post and it worked perfectly! I did have to make one edit:
Changed:
// Get the start and end dates VAR __dateStart = MAX([Date_Start]) VAR __dateEnd = MAX([Date_End])
To:
// Get the start and end dates
VAR __dateStart = [Date_Start]
VAR __dateEnd = [Date_End]
Thanks again, so much cleaner than my work 😉