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,...
Kumail
5 years agoImpactful Individual
Hello erikm
You can do something like this
Measure as filter =
VAR MonthsToLookBack = 10
VAR DataTableDate = MIN('Data Table'[Date])
VAR DateTableDate = MIN('Dates'[Date])
VAR DateAddAlternative = EDATE(DateTableDate,-MonthsToLookBack)
RETURN
IF(
(DataTableDate < DateTableDate) &&
(DataTableDate > DateAddAlternative) ,
-- FLAG IF TRUE --
1
)If you could send sample .pbix that demonstrate what you are looking to get. It would really help providing you a quick implemented solution.
Hope this helps
Regards
Kumail Raza