月的第x周
2020-12-12 本文已影响0人
BI罗
月的第x周 =
IF (
WEEKDAY ( 'D_Date'[Date] - DAY ( 'D_Date'[Date] ) + 1, 2 ) = 1,
WEEKNUM ( 'D_Date'[Date], 2 )
- WEEKNUM ( 'D_Date'[Date] - DAY ( 'D_Date'[Date] ) + 1, 2 ) + 1,
WEEKNUM ( 'D_Date'[Date], 2 )
- WEEKNUM ( 'D_Date'[Date] - DAY ( 'D_Date'[Date] ) + 1, 2 )
)