Forum Discussion
Creating a dynamic Date X axis
Hi PBI fam!
I want to know if it is possible to create an X - axis value that updates according to the Date filter applied across all pages?
My visual is a simple line graph showing percentages across each MonthYear for the last 36 months (This visual is currenly being filtered with a Relative Date of "within the last 36 calendar months" which is 06/2019 - 05/2022)
To make the report more user friendly I want to limit the number of date filters one has to change and so I want to apply a single date filter across all pages.
How is it possible to set this up? I want my visual to still show the last 36 months of data by looking at whatever the MAX selected date is.
eg. if I set the All Pages - Date filter to 01/01/2022 - 31/06/2022, then the visual should show percentages from 07/2019 - 06/2022
Please advise!
Thank you!
1 Reply
- amitchandakSuper User
HB13 , You need to use date from an independent date table in the slicer for that
a measure like
//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Date])
var _min = eomonth(_max, -12) +1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))Refer video
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI