Forum Discussion
Dynamic date filter to be implement as on yesterday
- 5 years ago
Hi Anonymous
You can create a MTD measure like below. When a specific date is selected with the slicers, calculate the MTD of that date, otherwise calculate yesterday's MTD.
MTD = VAR _yesterday = TODAY()-1 VAR _endDate = SELECTEDVALUE(DimDate[Date],_yesterday) VAR _startOfMonth = EOMONTH(_endDate,-1)+1 RETURN CALCULATE(SUM('Table'[Value]),DATESBETWEEN(DimDate[Date],_startOfMonth,_endDate))Before you publish the report, ensure the slicers don't select a date. After publishing the report to service, enter the report's settings pane and turn on the option Don't allow end users to save filters on this report under Persistent filters. Save the settings. Take note that this setting is working on the whole report.
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
Hi Anonymous
You could use "Today" column in slicer, but use original date columns in your measures.
Regards,
Jing
Hi v-jingzhang
It getting wrong values by doing that