Forum Discussion
limiting date slicer
- 5 years ago
Hi Anonymous
If I understand correctly, you want to first select a from date, and then only the 90 days after the from date display in the slicer for users to select a to date within them. In short, the days between from date and to date should be limited to less than 90 days, right? If so, it seems difficult to realize this in a slicer. Instead, I find an alternative option which will use two date slicers. You may take a try if you have interest in it. Steps are as follows.
1. Create a Calendar table.
2. Create a Date From slicer with 'Calendar'[Date] as field. Change the slicer to After mode.
3. Create a Date To slicer with 'Calendar'[Date] as field. Change the slicer to Before mode.
4. Create two measures as below. Put Measure on the Date To visual's filter and set value is 1.
FromDate = MINX(ALLSELECTED('Calendar'[Date]),'Calendar'[Date])Measure = IF(MAX('Calendar'[Date])>=[FromDate] && MAX('Calendar'[Date])<[FromDate]+90,1,0)Now you will get the slicers like the following image:
You can download the PBIX file.
Best Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.
If that is your goal, what is the point of having a "to" part in your slicer? Use a slicer with a single date value instead.
Hi lbendlin,
So sorry!
I had a similar post and thought the response was in reference to my post.
I did not see the original post.
Apologies!