Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Rolling 12 DAx Measure

I have a date slicer that goes from 12/31/2017-12/31/2019 (Next year Jan it will become 12/31/2017 - 12/31/2020).

 

I have visuals with the date as axis- But this axis should have only rolling 12 months. Ex: Now we are in July, so the axis would have 6/30/2018 - 6/20/2019. Similarly in August, this axis would be 7/31/2018 - 7/31/2019.

 

For now i am applying a page level slicer to affect each visual, choosing the dates i want it to be seen. However, it would be easy if i had a dax measure with a yes/no so that I can choose "Yes" in page level filter and next month it would change on its own rather than me doing it manually. 

 

The date table with date slicer look as follows:

 

The axis looks like this:

 

Any help on this? Thank you!

2 Replies