Forum Discussion
erikm
5 years agoFrequent Visitor
Set fixed date for date slicer
I am designing a report that contains a date slicer. Would it be possible to have the from-date automatically set, based on the to-date? For example, when the user selects 06/29/2021 as the end date,...
Icey
5 years agoCommunity Support
Hi erikm ,
Can this meet your requirements?
StartDate =
VAR SelectedDate_ =
SELECTEDVALUE ( Dates[Date] )
VAR StartDate_ =
DATE ( YEAR ( SelectedDate_ ) - 1, 1, 1 )
RETURN
StartDate_
Measure =
IF (
MAX ( 'Data Table'[Date] ) >= [StartDate]
&& MAX ( 'Data Table'[Date] ) <= SELECTEDVALUE ( Dates[Date] ),
1
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.