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.
Hello!
I have a dashboard that has a data segmentation with a date column, with "Between" option. I want it to whenever I open my report it would be filtered with the last month dates. So, for example if I open it now, it should display 2025-05-01 to 2025-05-31. If I open it in July, it should display 2025-06-01 to 2025-06-30.
The user should still be able to select other dates before or after last month, so I don't want to remove all other values. Just change the ones displayed on the data segmentation as I open the report.
Is there a way to do that?
Solved! Go to Solution.
This isn't possible with a range slicer unless you use another column in a slicer that limits the visible dates of the slicer itself. The column is default to say last month relative to the current date. The user must then unselect or clear the slicer to be able to select other dates. A similar approach can also be done with bookmarks but with just the range slicer it isn't possible. Alternatively and if using a dropdown/tile/button slicer, you can levarage the Group by Columns property to "store a filter by using an alternate value, which represents the key of the entity." Power BI uses this key to store the filter, allowing the corresponding filter value in the visual to change dynamically. For instance, if May-24 is selected in the visual and currently has a key of 0, when June arrives, May will shift to a key of 1, and June will take the key of 0. Consequently, the slicer selection will automatically change to June. Demo
Note: persistent filters will override whichever route you follow.
This isn't possible with a range slicer unless you use another column in a slicer that limits the visible dates of the slicer itself. The column is default to say last month relative to the current date. The user must then unselect or clear the slicer to be able to select other dates. A similar approach can also be done with bookmarks but with just the range slicer it isn't possible. Alternatively and if using a dropdown/tile/button slicer, you can levarage the Group by Columns property to "store a filter by using an alternate value, which represents the key of the entity." Power BI uses this key to store the filter, allowing the corresponding filter value in the visual to change dynamically. For instance, if May-24 is selected in the visual and currently has a key of 0, when June arrives, May will shift to a key of 1, and June will take the key of 0. Consequently, the slicer selection will automatically change to June. Demo
Note: persistent filters will override whichever route you follow.
Hi @EugenioProlog,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Power BI's "Between" date slicer can't automatically update to show last month every time you open the report. It just remembers the last selection or saved view. To work around this, you can create a separate slicer using a DAX column that only shows last month's data, and then save that as a bookmark. When the report opens, it will show data for last month by default. Users can still clear the filter or pick different dates. Another option is to use a custom "MonthKey" column where values like 0 mean the current month, 1 means last month, and so on this lets the slicer automatically update based on the calendar.
If this information was helpful, kindly mark the response as accepted and give it a thumbs-up, so it may assist others as well.
Best regards,
Prasanna Kumar
Hi @EugenioProlog Could you please provide some sample datan and visual mockup. So that I will provide the exact solution
User | Count |
---|---|
77 | |
75 | |
36 | |
31 | |
29 |
User | Count |
---|---|
94 | |
80 | |
55 | |
48 | |
48 |