Forum Discussion
dax for week number
- 3 years ago
Hi lisaburton ,
According to your description, here's my solution, create a measure.
Check = IF ( MAX ( 'Table'[Week No] ) = WEEKNUM ( TODAY () ), 1, 0 )Put the measure in the visual filter and select its value to 1.
After apply filter, get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
>>I have tried the slicer but it alters every visual on the report page and I just need it on the 1 matrix >>
Try setting the "Edit Interactions" under the Format menu (far left button) that will allow you to make it that the Slicer does, or does not, affect other visuals on the page.
>>Do you have the dax forulas for the 2nd option you mentioned? << I'm more of a SQL guy than DAX, and well, "to a hammer, the whole world is a nail". I used to build Date Dimensions, with all associated properties in T-SQL Views.
Try this:
Thank you!
- lisaburton3 years agoFrequent Visitor
I have a 'last week' dax and i can amend this to show the 'next week' date but how do i amend it to show this week date?
Last Week =IF (YEAR ( [Week ] ) = YEAR ( TODAY () )&& WEEKNUM ( [Week ],2 ) = WEEKNUM ( TODAY () -7 ),"Yes","No")