Forum Discussion
Default date range in date slicer
- 3 years ago
Hi Kandarp ,
Currently, there is no such function to set a default value for the slicer. But you can achieve this goal through the following methods.
1.Create a seperate table by entering data.
Here I use the exclamation mark to make him the first place in the slicer. The slicer is set to single selection.
2. Then the measure can be created like
Measure = IF(SELECTEDVALUE('Table (3)'[default value])="!previous 45 days",CALCULATE(SUM('Main table'[Value]),FILTER('Calendar',[Date]<=TODAY()&&[Date]>=TODAY()-44)),SUM('Main table'[Value]))In this way, every time you open the report, the default is the data of the previous 45 days. If you want to filter, select all from the single-choice slicer and filter the date range.
And similar question refer:
https://www.youtube.com/watch?v=KBEsPGxDxHM&feature=youtu.be
https://forum.enterprisedna.co/t/how-to-default-last-12-months-in-date-between-slicer/18697/17
Best Regards
Lucien
Hi Kandarp ,
Currently, there is no such function to set a default value for the slicer. But you can achieve this goal through the following methods.
1.Create a seperate table by entering data.
Here I use the exclamation mark to make him the first place in the slicer. The slicer is set to single selection.
2. Then the measure can be created like
Measure = IF(SELECTEDVALUE('Table (3)'[default value])="!previous 45 days",CALCULATE(SUM('Main table'[Value]),FILTER('Calendar',[Date]<=TODAY()&&[Date]>=TODAY()-44)),SUM('Main table'[Value]))
In this way, every time you open the report, the default is the data of the previous 45 days. If you want to filter, select all from the single-choice slicer and filter the date range.
And similar question refer:
https://www.youtube.com/watch?v=KBEsPGxDxHM&feature=youtu.be
https://forum.enterprisedna.co/t/how-to-default-last-12-months-in-date-between-slicer/18697/17
Best Regards
Lucien