Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi!
I have a report that uses a dates slicer (between) to filter the visuals.
My users wanted to open the report everyday and have the slicer set to a default time range with the max dat set to yesterday (cause every morning they're basically seeing the results from the last day)
When trying to achieve this I made a column in my Calendar Table called Day (Relative) that takes value '0' if it's TODAY(). I then filter my Date Slicer visual to have that Day (Relative) be less than 1.
My problem now comes when I want to see every day the default date in the slicer and at the same time see my card filtered for that default max date (yesterday).
This only works if I click on the slicer circle or manually pick the date again, otherwise, even tho the slicer itself updates cause my report dataset has a daily refresh, the card visual stays blank unlesss I click again on the date slicer.
I have attached a sample of my report with this situation.
All help welcomed, thank you!
I have the same customer's requirement, any solution to prefiltered as default yesterday date and to have also the posibility also to select a range?
Thanks!
It seems like you're using Power BI or a similar data visualization tool to create your report. Your goal is to have a date slicer that defaults to a specific time range with the max date set to yesterday, and you want this default behavior to be applied automatically when users open the report.
The issue you're facing with the card visual not updating automatically when you load the report is likely due to the way the slicer interaction is set up. To achieve the desired behavior, you can follow these steps:
Create a Date Table: Ensure you have a Date table in your data model with a column that contains a continuous date range. This table should have a relationship with your main data table.
Set Default Values for Slicer: In Power BI, you can set default values for slicers by using the "Edit Interactions" feature. Here's how you can do it:
You can now define how other visuals on the report page interact with the slicer. For your case:
Create Measures for Default Values: Create DAX measures that calculate the default values you want for the slicer:
Set Default Values in Slicer: In the slicer, you can set these measures as the default values:
Now, when users open the report, the slicer will automatically default to the desired date range, and it should also filter the card visual accordingly without the need for users to interact with the slicer again.
Remember to ensure that your dataset's refresh schedule is set up to update the data daily so that the default end date (yesterday) is always accurate when users open the report in the morning.
@123abc There is no way to set defult values for the date slicer when the style is "Between". You probably didn't understand the request of the user who raised the issue.
Hi @123abc , regarding this suggestion below, can it be achieved on a date slicer with the Between style? Can't find how to do it.
Set Default Values in Slicer: In the slicer, you can set these measures as the default values:
Hello, any solutions on this? without limiting calendar to yesterday?
@Anonymous , As of now I doubt you can default the date range slicer.
We do a workaround for normal slicer to have column like
Date Type = SWITCH(TRUE(),'Date'[Date]=TODAY(),"Today",'Date'[Date]=TODAY()-1,"Yesterday",'Date'[Date]&"")
and save it for yesterday
Default Date Today/ This Month / This Year: https://www.youtube.com/watch?v=hfn05preQYA
hii, yes i have considered that solution but it works only if i use a slicer as a dropdown or list, because i'm mixing Text ("Yesterday" and "Today") with my date values. If i use the slicer style "Between" that will not work unfortunately.
meawnhile i have found a work around which was to limit my calendar to end in "yesterday", this way my card visual will not be blank.
problem is now if i have other pages in the report that, for example, have forecast and need the calendar to end in something like 31-12-2023
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
79 | |
65 | |
52 | |
30 |
User | Count |
---|---|
115 | |
114 | |
71 | |
66 | |
39 |