The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Good day
I am attempting to configure my between date slicer to default to the last 10 days each time the report opens, however then allow the users to select any other dates they want.
The slicer has to be a between slicer as the relative does not provide suffient flexibility in choosing date ranges.
I do not want to make use of 2 "buttons" where one stqates default, ie last 10 days, and the other states custom value, which then allow the user to select any dates they want as I am certain users will get confused when it is set on default why they cannot change the start date to be further back.
Is this possible? I come from a Tableau environment where this was very easy, and now with Power BI seems not possible, yet in my mind is an obvious requirement that many would need.
On the above I also within other sheets in my dashboards need to default to MTD, YTD and F YTD, however at the same time need to allow the user to select any other date range as well.
Please can someone assist.
Thank you
Solved! Go to Solution.
Hi @PLHM,
I understand that you’re trying to set a "Between" date slicer that defaults to the last 10 days when the report loads, while still allowing users to select any custom date range beyond that.
Unfortunately, this specific functionality—defaulting a "Between" date slicer to a set period like the last 10 days while still enabling users to select any custom range beyond that—is not currently supported in Power BI. Power BI applies slicer filters by default, which means that once the slicer is pre-set with a date range (like the last 10 days), it limits the user’s ability to change that range freely.
This is a known limitation in Power BI.
Submit your idea to Microsoft. If you get enough votes, they may consider in future. Raise your idea here.
Fabric Ideas - Microsoft Fabric Community
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Would it be safe to say then that what I am attempting to do, that is very easay in something like Tableau, is not possible then to do in Power BI, as the solution you have provided does not then allow the user to select a range outside of the 10 day window period.
Hi @PLHM,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Based on your scenario, you want to use a single "Between" date slicer (not relative), have the slicer display all available dates so users can select any custom range, and have the default behavior show the last 10 days of data when the report opens, without filtering the slicer itself to only the last 10 days.
Please find the attached .PBIX file which demonstrates this behavior.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
I am wanting my report when it loads the date slicer to default to the last 10 days. At the same time though I want to allow the user to select any date outside of that though. Yes I require this to be a between slicer. I do not want additional buttons to say last 10 days and then it filters last 10 days, and then custom which then allows any range to be selected.
The pibx you have sent me default to the beginning of the year and then end of the year and does not appear at all to deal with the last 10 day, as an example, that I am trying to do. No where that I am seeing deals with defaulting the date between slicer to a last "X" period.
Hi @PLHM,
I understand that you’re trying to set a "Between" date slicer that defaults to the last 10 days when the report loads, while still allowing users to select any custom date range beyond that.
Unfortunately, this specific functionality—defaulting a "Between" date slicer to a set period like the last 10 days while still enabling users to select any custom range beyond that—is not currently supported in Power BI. Power BI applies slicer filters by default, which means that once the slicer is pre-set with a date range (like the last 10 days), it limits the user’s ability to change that range freely.
This is a known limitation in Power BI.
Submit your idea to Microsoft. If you get enough votes, they may consider in future. Raise your idea here.
Fabric Ideas - Microsoft Fabric Community
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
That is very disappointing to hear that something in my mind that should be a given in dashboards and reporting was never thought of up front. Will definitely add it to the ideas page / vote for the idea.
Hi @PLHM,
We’re following up once more regarding your query. Could you please confirm whether you’ve raised this as an idea in the Ideas Forum?
Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.
Thank you.
Good day @v-saisrao-msft
Yes I have raised this as an idea and can only hope one day soon it is implemented. It is still beound me how something like this is not available as standard from day 1
Hi @PLHM,
Thank you for the update. I understand how important this feature is to you. For any other issues or questions, please continue using the Microsoft Fabric Community we’ll be glad to assist you there.
Hi @PLHM,
Thanks for the update. Please use the Microsoft Fabric community for further assistance.
Thank you
@PLHM Ensure you have a Date table in your model. If not, create one.
Create a new table that will be used for the slicer. This table will not be connected to your data model.
SlicerDates = CALENDAR(MIN('Date'[Date]), MAX('Date'[Date]))
Create a measure that calculates the last 10 days.
DAX
Last10Days =
VAR MaxDate = MAX('Date'[Date])
VAR MinDate = MaxDate - 9
RETURN
IF(
MAX('SlicerDates'[Date]) >= MinDate && MAX('SlicerDates'[Date]) <= MaxDate,
1,
0
)
Create a measure that will be used to filter your data based on the slicer selection or the default last 10 days.
DAX
FilteredData =
VAR MaxDate = MAX('SlicerDates'[Date])
VAR MinDate = MaxDate - 9
RETURN
IF(
ISFILTERED('SlicerDates'[Date]),
IF(
MAX('Date'[Date]) IN VALUES('SlicerDates'[Date]),
1,
0
),
IF(
MAX('Date'[Date]) >= MinDate && MAX('Date'[Date]) <= MaxDate,
1,
0
)
)
Use the FilteredData measure to filter your visuals. You can do this by adding the measure to the visual-level filters and setting it to 1.
Add a slicer to your report using the SlicerDates table.
Proud to be a Super User! |
|
My slicer then only shows the optins of 10 days ago date and todays date, no other date values can be selected from the slicer calendar options. Did I miss something, can you elaborate. Possibly missed a step.
I have the date table and the 2 measures.
The slicer is the Date field from the Date table and the Visual filter is the FilteredData = 1