Forum Discussion
Set TODAY as default date in slicer visual (date range)
Hello,
I want my date range (slicer) to dynamically set the date range from the first date value in the dataset to the current date (i.e. today's date). We have some target values for future dates, however, I want the slicer to set the date range limit to current date and dynamically change the current date as we move on to the next date.
Hi Anonymous,
Currently, it is not supported to set default values for slicer. Here is an idea, you could click to vote it up.
Best regards,
Yuliana Gu
15 Replies
- ELW
Advocate II
Happy fifth birthday to this question. It looks like there is still no real solution to wanting a date range slicer to default to the latest date in the data when refreshed?
- AnonymousNot applicable
Baffling right?
- v-yulgu-msft
Microsoft Employee
Hi Anonymous,
Currently, it is not supported to set default values for slicer. Here is an idea, you could click to vote it up.
Best regards,
Yuliana Gu
- prateekraina
Memorable Member
Hi Anonymous, v-yulgu-msft
In case if you are embedding the report, It is possible to set default values for slicer through Power BI Javascript API.
Here is the link:
https://github.com/Microsoft/PowerBI-JavaScript/wiki/SlicersAlso, you can see working demos of these APIs through Power BI Embedded Playground.
https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.htmlRegards,
Prateek Raina
- AnonymousNot applicable
Hi Prateek,
Unfortunately I am not. But thank you for those links!
- AnonymousNot applicable
Thanks Yuliana!
- AnonymousNot applicable
- AnonymousNot applicable
The first image is what I have as default. The second image is what I want by default.
- LivioLanzo
Solution Sage
Anonymous
it's possible but you 're going to need to share an example of your data
- AnonymousNot applicable
Hi LivioLanzo,
What exactly would you need?
Thanks!- LivioLanzo
Solution Sage
An example of your tables and how they are related
- nanojauFrequent Visitor
Hello community,
I working in the Power BI Report and I would like to Set as Default Date in Slicer. Follow below example:
I want to bring Filters on this visual with(Today() – 90 days) when I open the report in this range and start with default. The Date Slicer cannot be locked(affected by the Filters on this visual) in the same range (Today() – 90 days), but yes showing all date range and inactive the Filters on visual page like the picture above:
Regards,
Adriano F Pereira
- mustafaasiroglu
Microsoft Employee
You can check following article to create a slicer with custom defaults: (99+) Custom Range Date Slicer in Power BI with dynamic defaults and more... | LinkedIn