Forum Discussion
Dynamically select date slicer
Hi All,
I wanted to select the dates dynamically depending upon which month it is.
I.e. - for example, currently it is March 2023 so in the date slicer historical dates till March 2023 must be selected.
3 Replies
- andhiii079845Solution Sage
You can create a measure and filter your slicer with this measure: "IS NOT BLANK ()"
If you show "select all" in the options and set it active all shown dates are selected for default.filter = COUNTROWS(FILTER('date','date'[Date]<=TODAY())) - Thennarasu_RResponsive Resident
Hi truptis
For current Month want move slicer automatically created one Calculated Column in that column you need to set one text Name like "Current Month " or Any other name is your Wish. we can achieve this way only .I'm Achieve .Month 1 = Var __Mon=FORMAT('Date'[Date],"mmm")var __Yr=FORMAT('Date'[Date],"YYYY")ReturnVar _Result=IF(__Mon=FORMAT(TODAY(),"MMM"),IF(__Yr=FORMAT(TODAY(),"YYYY"),"Current Month",FORMAT('Date'[Date],"MMM")))ReturnIF(_Result=BLANK(),FORMAT('Date'[Date],"MMM"),_Result)
If have helpful to you Give kudos and accepeted a solution.
Thanks,
Thennarasu - lbendlinSuper User
As a super user you should stop using slicers. 🙂 Use the filter pane.