Forum Discussion
Measure based on Today's date
- 8 years ago
you need to use WEEKDAY
https://msdn.microsoft.com/en-us/query-bi/dax/weekday-function-daxWEEKDAY(TODAY(),2)<3
depending on whether the week starts on Saturday or Sunday you should pass a proper parameter instead of 2
- 8 years ago
Hi harrinho,
Based on the syntax of WEEKDAY function, by default the day ranges from 1 (Sunday) to 7 (Saturday).
Syntax : WEEKDAY(<date>, <return_type>)
<return_type>:
A number that determines the return value:
Return type: 1, week begins on Sunday (1) and ends on Saturday (7). numbered 1 through 7.
Return type: 2, week begins on Monday (1) and ends on Sunday (7).
Return type: 3, week begins on Monday (0) and ends on Sunday (6).numbered 1 through 7.For your scenario, your return type could be 1.
Best Regards,
Cherry
you need to use WEEKDAY
https://msdn.microsoft.com/en-us/query-bi/dax/weekday-function-dax
WEEKDAY(TODAY(),2)<3
depending on whether the week starts on Saturday or Sunday you should pass a proper parameter instead of 2
Thank you Stachu. The week starts on Sunday, what would be the proper parameter?
- v-piga-msft8 years agoResident Rockstar
Hi harrinho,
Based on the syntax of WEEKDAY function, by default the day ranges from 1 (Sunday) to 7 (Saturday).
Syntax : WEEKDAY(<date>, <return_type>)
<return_type>:
A number that determines the return value:
Return type: 1, week begins on Sunday (1) and ends on Saturday (7). numbered 1 through 7.
Return type: 2, week begins on Monday (1) and ends on Sunday (7).
Return type: 3, week begins on Monday (0) and ends on Sunday (6).numbered 1 through 7.For your scenario, your return type could be 1.
Best Regards,
Cherry