Forum Discussion
bella769
5 years agoFrequent Visitor
Default slicer date
Hi I have a date slicer which looks like this and my dashboard is refreshed daily with the date/time shown does anyone know how to get the slicer to automatically select the date th...
Anonymous
5 years agoNot applicable
Hello @bella769
Currently we would not be able to add a measure in the slicer so that today's date is automatically filtered, however, we could create a measure in your visual to achieve your goal.
I build a sample table:
Create a dimdata table.
Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))
Theb construct a measure, drag it to the filter field, and set it to display items when it is not blank.
Measure =
VAR _SEL = SELECTEDVALUE('Date'[Date])
VAR _Date = IF(ISFILTERED('Date'[Date]),_SEL,TODAY())
VAR _Result = IF(MAX('Table'[Date])=_Date,1,BLANK())
RETURN
_Result
The result is as shown below, it will display the values currently by default, and you can use slicer to display values on different dates.
You can download the pbix file from this link: Default targeting date
Best regards
Rico Zhou
If this post helps,then consider Accepting it as the solution to help other members find it faster.