Forum Discussion
Date slicer default values
Hi, I have date slicer (between) in my report and I would like to set "To date" to todays date and "From date" to first day of current month everytime when user opens that report.
Is this possible in Power BI RS (May - 2024)?
Thanks in advance for the advice.
Martin Strnad
6 Replies
- dan4314New Member
Hello Martin Strnad,
maybe this will help you https://www.youtube.com/watch?v=JlVHsZUk1nc.
- AnonymousNot applicable
Hi, strn1k
You can try the following methods.
Measure = Var _date1=DATE(YEAR(TODAY()),MONTH(TODAY()),1) Var _date2=TODAY() RETURN IF(SELECTEDVALUE('Date'[Date])>=_date1&&SELECTEDVALUE('Date'[Date])<=_date2,1,0)Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- strn1kFrequent Visitor
Hi, this is very great, thanks for the answer.
But there is still one huge issue, the date filter now has the date range that I want but it is not applied to the visualizations :(.
So users have to "confirm" (click to filter and click to both dates) to apply this filter to visualizations and it is very undesirable.- strn1kFrequent Visitor
Hi Anonymous , do you know why the filter is not applied?
- strn1kFrequent Visitor
Hi Anonymous , do you know why the filter is not applied?
- AnonymousNot applicable
Hi, strn1k
For any view you want to output you can apply measure equal to 1.
Please check the attachment to see if it helps.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.