Forum Discussion
Anonymous
6 years agoNot applicable
Dax Calandar weeks like Relative date filter
I'm wanting to make a Dax statement that is like the relative date filter. I have other measures that would be impacted if I use the filter.
- 6 years ago
hi Anonymous
Try to create a measure as below:
CALCULATE ( [Expression], FILTER ( ALL ( 'Date'[Date] ), 'Date'[Date] <= MAX ( 'Date'[Date] ) && YEAR ( 'Date'[Date] ) = YEAR ( MAX ( 'Date'[Date] ) ) && WEEKNUM ( 'Date'[Date] ) = WEEKNUM ( MAX ( 'Date'[Date] ) ) ) )If not your case, please share the sample pbix file and your expected output.
Regards,
Lin
v-lili6-msft
Community Support
6 years agohi Anonymous
Try to create a measure as below:
CALCULATE (
[Expression],
FILTER (
ALL ( 'Date'[Date] ),
'Date'[Date] <= MAX ( 'Date'[Date] )
&& YEAR ( 'Date'[Date] ) = YEAR ( MAX ( 'Date'[Date] ) )
&& WEEKNUM ( 'Date'[Date] ) = WEEKNUM ( MAX ( 'Date'[Date] ) )
)
)
If not your case, please share the sample pbix file and your expected output.
Regards,
Lin