Forum Discussion
zausten
Helper I
4 years agoSetting Default Date on Slicer
Hi, Is there anyway to set a default date on a "between" date slicer. Users do not want to use relative date Old threads suggest not, has anyone been able to work around? https://community.powerb...
v-yanjiang-msft
Community Support
4 years agoHi zausten ,
We can't let the slicer select Date = Today by default, but we can create a measure to show you the value on today.
1.Creat a calendar date table, and put it into the slicer.
Slicer = CALENDARAUTO()
2.Create a measure, put it into the visual filter, and let the value is 1. The expiration date of the date column will be today by default. If you use the slicer, the visual will be filtered by the slicer.
Measure =
VAR _MINDATE =
MIN ( Slicer[Date] )
VAR _MAXDATE =
MAX ( Slicer[Date] )
RETURN
IF (
ISFILTERED ( Slicer[Date] ),
IF (
MAX ( 'Table'[Date] ) <= _MAXDATE
&& MAX ( 'Table'[Date] ) >= _MINDATE,
1,
0
),
IF ( MAX ( 'Table'[Date] ) <= TODAY (), 1, 0 )
)
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.