March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I'm currently having trouble setting up PowerBI reports to utilize both Custom Date Range Slicers (Such as pre-selecting from YTD, QTD, MTD, etc) and also combining it with the flexiblity of a Custom Date Selector/Slider.
When reviewing more recent tutorials online I've noticed it seems reports can either come in the form of pre-selected date ranges or just using the date selector slider but never both at the same time!
In some older videos I've seen on Youtube (such as this one from 3 years ago: https://www.youtube.com/watch?v=fKygF7VEJnQ), there used to be ways to disable the custom date selector/slider when a user is using the pre-selected date ranges, and to re-enable it when the user selects 'Custom'. However, it seems with the most recent version of PBI, the filter method no longer actually disables the date selector slider....
In my screenshot below, when selecting the pre-selected date ranges (MTD, QTD, YTD), it updates all my visuals but fails to update the proper dates on the calendar slider and vice-versa.
Any suggestions or resources on how I can get both functioning in a report? It's a requirement for the user to be able to quickly select preselected date ranges, but also revert back to a custom date when needed.
Solved! Go to Solution.
I have a tutorial and a sample pbix on YouTube. https://youtu.be/A3XvBiNdjXI?si=OvnowbQ8OtbvnO8o
If you need both slicers to filter each other, you will need to set the direction of the relationship to both, use a visual filter or use the date column from the preset table. Play around with the sample pbix. Each approach will have its own pros and cons.
Proud to be a Super User!
I have a tutorial and a sample pbix on YouTube. https://youtu.be/A3XvBiNdjXI?si=OvnowbQ8OtbvnO8o
If you need both slicers to filter each other, you will need to set the direction of the relationship to both, use a visual filter or use the date column from the preset table. Play around with the sample pbix. Each approach will have its own pros and cons.
Proud to be a Super User!
Thanks Danextian, I watched the entire video and appreciate the very thorough walkthrough. Was able to create a similar setup with the preset and date slider, and also successfully have the date slider update when the preset was utilized.
Just wondering if when changing the date via the date slider, is there a way to automatically have the preset slicer change to 'Custom'?
That is not currenlty possible. The dates in the date slicer will be limited based on the presets. You can write a measure to visually filter a slicer instead but with some limitations.
Current Date Count =
COUNTROWS(d_Dates)
Total Count by Preset =
CALCULATE (
DISTINCTCOUNT ( DatePresets[Date] ),
ALLEXCEPT ( DatePresets, DatePresets[Preset] )
)
Filter to Custom =
VAR __DateCount = [Current Date Count]
VAR __PresetTotal = [Total Count by Preset]
VAR __custom =
CALCULATE ( IF ( __DateCount < __PresetTotal, "Custom" ), ALL ( DatePresets ) )
RETURN
IF (
__custom = SELECTEDVALUE ( DatePresets[Preset] )
|| NOT ( ISFILTERED ( d_Dates ) ),
1
)
The initially selected preset will not be deselected. The slicer will be filtered to custom but will not be selected.
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
132 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |