M和DAX里都没有现成的Networkdays函数,得自己写。
Networkdays DAX =
CALCULATE (
COUNTROWS ( Calendar ),
DATESBETWEEN ( Calendar[Date], DATE ( 2020, 1, 18 ), DATE ( 2021, 2, 25 ) ),
NOT WEEKDAY ( Calendar[Date] ) IN { 1, 7 },
EXCEPT ( Calendar, Holidays ) // Holidays 是节假日表
)
M语言里相应函数等等其他老师帮忙。 |