Forum Discussion
NewbieJono
4 years agoPost Partisan
Working day, not include Bank Holiday or Weekend
i am trying to add a marker in my table to say if its a working day. this code does not seem to work. i think its the line regarding bank holiday
IsWorkingDay = IF
(NOT('DIM - Date Table'[weekday]= 6 ||
('DIM - Date Table'[weekday]= 7)) ||
'DIM - Date Table'[Date] IN DISTINCT ('DIM - Bank Holidays'[Holidays]),
1,0)
- Anonymous4 years ago
HI NewbieJono,
I think the workday rule should be not the weekend and not included in the holiday table records, right? If that is the case, you can try to use the following formulas:
IsWorkingDay = IF ( WEEKDAY ( 'DIM - Date Table'[weekday], 2 ) < 6 && NOT ( 'DIM - Date Table'[Date] IN ALL ( 'DIM - Bank Holidays'[Date] ) ), 1, 0 )Regards,
Xiaoxin Sheng
4 Replies
- parry2kSuper User
NewbieJono what is the relationship between Dim Date Table and Dim - Bank Holidays tables?
- NewbieJonoPost Partisan
one to many
- parry2kSuper User
which side is one and which side is many? Why it would be one to many?
- AnonymousNot applicable
HI NewbieJono,
I think the workday rule should be not the weekend and not included in the holiday table records, right? If that is the case, you can try to use the following formulas:
IsWorkingDay = IF ( WEEKDAY ( 'DIM - Date Table'[weekday], 2 ) < 6 && NOT ( 'DIM - Date Table'[Date] IN ALL ( 'DIM - Bank Holidays'[Date] ) ), 1, 0 )Regards,
Xiaoxin Sheng