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
Anonymous
Not applicable

Set default limits for between date filter

Hello to you,

 

my issue is pretty simple to explain but I haven't found anything to solve it.

 

I have a normal date filter with "between" mode:

 

1.png

 

I need to model it so that when I open the report start and end date are not the minimum and the maximum ones but they should be set to show data from last completed month. For example:

  • if today it's April, 30th --> it should be set from March, 1st to March, 31st
  • if it's May, 1st --> it should be set from April, 1st to April, 30th

Then if I want to change the date range of course I can, but when I open it I should find it set showing last completed month. I can do it with a bookmark, but I want to know if there is a way to do it directly without creating any bookmark.

 

Is there a way?

 

Thank you so much.

 

Nick

10 REPLIES 10
amitchandak
Super User
Super User

@Anonymous 

You can try relative date slicer

https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you @amitchandak for your hint.

 

Well it would be nice, but I'd need to keep the filter in between mode and opening it with last month already selected dynamically. You suggestion is good but I want to have this kind of slicer and possibly add some code/column/measure/whatelse to achieve it.

Greg_Deckler
Community Champion
Community Champion

So generally you would create a calculated column to flag last month dates and then use that as a filter in your slicer.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thank you @Greg_Deckler  for answering.

 

I already tried but if I use this filed as a visual filter it doesn't work. I see it works if I use a date column on my data table but I am using data coming from Calendar function (my field is Date = CALENDAR(MIN(My_Date); MAX(My_Date)) ) and it looks not influenced by the filter you are suggesting.

So is that Date a table in the model?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  yes, it comes from a table built with Calendar fuction right to create this date field

@Anonymous 

 

You may refer to the post below.

https://community.powerbi.com/t5/Desktop/i-have-two-dates-using-measures-and-want-to-set-these-dates...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks @v-chuncz-msft this is pretty simple but good. I already thought to it, I'd like to know if there is a way to do it without adding any visual but simply open the report with dates already set on last month.

So can't you add your flag column to that table?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler if you mean adding the flag column to the visual level filter, yes I can but it has no effects and dates still remain to normal range without being influenced by it. I see it doesn't happen if I don't use Calendar date but a date field from my data, but I need Calendar because I need every single day and not just days for which there is a record.

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.