Created
August 22, 2018 07:25
-
-
Save Cabeda/44c8e122cdb4bc5317aa5d9f75c122a7 to your computer and use it in GitHub Desktop.
Column to detect if a date is in the last completed week relatively to today
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IslastCompleteWeek = | |
IF ( | |
WEEKNUM ( | |
'Calendar'[Date], | |
2 | |
) = IF ( | |
WEEKNUM ( | |
TODAY (), | |
2 | |
) = 1, | |
WEEKNUM ( | |
DATE ( YEAR ( | |
( | |
TODAY () | |
) | |
) - 1, 12, 31 ), | |
2 | |
), | |
WEEKNUM ( | |
TODAY (), | |
2 | |
) - 1 | |
) -- Is last complete week | |
&& 'Calendar'[Year] = YEAR ( | |
( | |
TODAY () | |
) | |
), | |
-- Current Year | |
TRUE (), | |
FALSE () | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment