Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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.         
  • v-lili6-msft's avatar
    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