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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply

Problem - Slicer Date (multiple selection) by default last day

Hi everyone!

 

I’m asking for your help to solve an issue with the date filter in my Power BI Report. Among my filters, I have a date filter (dropdown slicer with multiple selection) that comes from my dimensional table dim_Calendar and is linked to my fact tables through the Run_date field.

 

What the client requires is that the date displayed in the filter is always the most recent available date, while still allowing the user to select one or more days through the dropdown menu.

 

Yesterday I set up the filter and scheduled the daily refresh. Today I expected the filter to show August 21st, but instead the date displayed was still August 20th (although when opening the dropdown menu, the August 21st date does appear).

 

Please note that I have a star schema with two fact tables (Direct Query connection) and five dimension tables (Dual Mode connection).

 

How can I fix this? I haven’t figured out how to solve the problem yet.

Thanks in advance.

 

 

Elisa_Costanza_1-1755782632735.png

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Elisa_Costanza ,

 

You cannot have this directly, you need to create a new column (using Power Query or DAX calculated column) with the value for the current date saying today so your data on that specific column will look like:
Today

8/20/2025

8/19/2025

8/18/2025

...

1/1/2025

 

Then do a sort of this column by the date column so you have the correct sorting, then use this specific column on your slicer and select the Today value before publishing that will force the value to always be the default one.

 

The rest will work in the same way.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

4 REPLIES 4
lauriedata
Resolver I
Resolver I

@MFelix Is there a way to have the last two dates be the default choice, not just one?  I can't have them combined into a "last 2 days" choice unless I can also have the last two dates as independent choice.  That is, the user needs to be able to either choose "last 2 days" or switch the default to one of the last two days and any other day they prefer in the calendar.  Thanks in advance.

Hi @lauriedata ,

 

I have done something similar adding two values:

Today

Today - 1

3/11/2025

2/11/2025

1/11/2025

....

1/1/2025

 

You code should be similar to:

DAX Code =
SWITCH(TRUE(),
      Table[Date] = Today(), "Today",
      Table[Date] = Today()-1, "Today -1",
      Table[Date]
     )



M Code:
if [Date] = Date.From (DateTime.LocalNow()) then "Today" else if  Duration.Days (Date.From (DateTime.LocalNow()) - [Date]) = 1 then "Today - 1"  else [Date]

 

You can replace those values by whatever you see fit the questions is you need to have them selected on the slicer so it get's picked up every single day.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi @Elisa_Costanza ,

 

You cannot have this directly, you need to create a new column (using Power Query or DAX calculated column) with the value for the current date saying today so your data on that specific column will look like:
Today

8/20/2025

8/19/2025

8/18/2025

...

1/1/2025

 

Then do a sort of this column by the date column so you have the correct sorting, then use this specific column on your slicer and select the Today value before publishing that will force the value to always be the default one.

 

The rest will work in the same way.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Thank you so much 🎉 it works. I would have preferred to see the latest date directly in the format 22/08/2025, but it seems to be the only possible solution for the moment..

Thank you @MFelix 😀

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors