power BI count absent days no weekend code example

Example: power BI count absent days no weekend

IsWorkingDay = IF (NOT(DimTable[WeekName] = "Saturday" || (DimTable[WeekName] = "Sunday")) && COUNTX(RELATEDTABLE(Holidays);1) < 1; 1; 0)

/*
IsWorkingDay is in DimTable. 
First part of formula is saying take every day from Monday to Friday (not Saturday or Sunday),
and second part is going into Holidays Table where I have list and dates of holidays. 
Everything is conducted with IF function. 
The result is 1 for working days and 0 for holiday or weekend.
*/

Tags:

Misc Example