📌  相关文章
📜  电源 BI 计数缺席天数没有周末 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:50.798000             🧑  作者: Mango

代码示例1
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.
*/