Forum Discussion
Time measures excluding weekends
You are not specifying what your weekend days are. You are also not specifying if the data comes from different time zones. You have not specified how long a business day is. (Assumption would be Sat/Sun, no, and eight?)
Have you already created a Dates table (sometimes also called Calendar table)? Usually that is where you add the "workday" flag. Is that table only used in one timezone or is it based on UTC ? Fun fact - the Power BI service thinks in UTC. Endless entertainment for scenarios like yours.
Hi Ibendlin,
Thanks for replying.
Weekends would include Saturday and Sunday. No different time zones only GMT. Business hours would be in fact 8 am till 4pm Mon-Fri.
I do have a calendar I created using the formula Calenderauto(). Hope this is sufficient.
Thanks!
Lexi.
- lbendlin6 years ago
Super User
One more thing . you have not specified how to handle exceptions, ie when one or both of your timestamps happen to be on weekends or on workdays but outside the agreed business hours? Do you penalize users for that?
- Lexi6 years agoFrequent Visitor
Hi again,
I have tried all links with no success.
The dax code, seems to be the closest thing but an error comes up: the start or end date in calendar function can not be blank. Even if I put the created date and completed date.
Working Hours =VAR filtered =FILTER (ADDCOLUMNS (CROSSJOIN (CALENDAR ( [Created Date],[Completed Date] ),With the exceptions, I was thought that the "timer" would count from the next date or time ie Mon-FRi 8am-5pm.Thanks,Lexi- Anonymous6 years agoNot applicable