Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
EugenioProlog
Helper I
Helper I

How to filter last month on data segmentation?

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?

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @EugenioProlog 

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. 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @EugenioProlog 

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. 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
v-pgoloju
Community Support
Community Support

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

ajaybabuinturi
Solution Sage
Solution Sage

Hi @EugenioProlog Could you please provide some sample datan and visual mockup. So that I will provide the exact solution

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.