Forum Discussion
Create Dynamic Date range Slicer that changes to new date based on data
- Anonymous2 years ago
Hi Anonymous The steps I followed and which worked for me is, I readded a Academic Year slicer and Date Slicer in report. According to the requirement, I wanted to remove interaction on 'Academic Year' slicer and something unusual is, the date slicer lost it's interaction with all other visuals automatically. I retested it again and it is same. So, basically the fix is to remove the blocked interaction on Date Slicer. I am not sure if this problem is with recent version of PBI.
Hi Anonymous
I assume you are meaning a single select slicer that isn't updating? This is an issue I have encountered before.
My work around is to use the Filter pane to apply a Top 30 filter based on the date itself.
Here for example it always shows the last 30 dates worth of data:
I have tested it on a double select slider and it appeared to work also.
If this helps please mark it as a solution for others to find 🙂
- Anonymous2 years agoNot applicable
SamWiseOwl Thank you for your response. This is how the slicer looks like
The Date range should update to only the days transaction happened in the year. That is the minimum date will show the first date while the maximum date will update to show the last date that is available in the data. For the current year the maximum date will continously change as new data becomes available even after report has been published.
Unfortunately the Filter option does not fit this solution. Thank you so much for your contribution.- SamWiseOwl2 years agoSuper User
Hi Anonymous
Apologise I must be misunderstanding, this is what I have done.
Set the Year dropdown slicer to Top 1 by Max Calendar Year this will change whenever the calendar table is refreshed by new data.Under Format make sure the drop down slicer can FILTER the Date slicer using interactions.
Here I have added a new date into my model which regenerates the Calendar table which causes the dropdown to change updating the Date slicer:
- Anonymous2 years agoNot applicable
SamWiseOwl Thank you. This implementation does not fit this solution. Imagine 2018 is selected in the Year, I want the Date slicer to automatically switch to show date that applies to 2018 data and if new data is added for 2018 the Date range should adjust to accomodate the new date in the data. I have implemented the relationship between the date table and the fact table in the model. I have also edited the interaction so that it is only the Year slicer that interacts with Data slicer. All of this has already been handled. The solution you shared does not work for this. See how the date slicer should work here https://www.youtube.com/watch?v=D4AF9lQCick
Thank you so much, I really appreciate your suppport.