cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
OneWithQuestion
Post Prodigy
Post Prodigy

Date Filter: default to current day?

Is there anyway to set a date filter to default to current day, or X days ago, etc?

 

I've tried doing relative date last week or is today, etc... but all that does it limit the values available to select.

 

The value the report was last saved under is always the value selected on load.

 

For example I published a report Feb 18th.  Now, every time the page loads, it always has Feb 18th selected, regardless of how I set the relative date filter options.

1 ACCEPTED SOLUTION

I know this problem.
I create a column where i renamed the actual day as "Actual day", to set the default filter on it.

 

DateFilter = IF('Date'[Date]=TODAY(),"Actual day",FORMAT('Date'[Date],"dd.MM.yyyy"))
 
DateFilter.png
 
Please give Kudos for support.
If I answered your question, please mark my post as solution, this will also help others.
Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

3 REPLIES 3

I know this problem.
I create a column where i renamed the actual day as "Actual day", to set the default filter on it.

 

DateFilter = IF('Date'[Date]=TODAY(),"Actual day",FORMAT('Date'[Date],"dd.MM.yyyy"))
 
DateFilter.png
 
Please give Kudos for support.
If I answered your question, please mark my post as solution, this will also help others.
Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener work at KUMAVISION AG , one of the world's largest
implementation partners for Microsoft Dynamics. #
"Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Anonymous
Not applicable

I tried your solution, adding a column "Filtre mois" : 

=if(SecuriteAuTravail[Dernier_mois_dispo]=SecuriteAuTravail[mois_x] ;"Dernier mois disponible";SecuriteAuTravail[Mois])

 

So, if the month is the last month available, it displays "Dernier mois disponible", if not, it displays the month name.

It works fine in the report, when refreshing with new data loaded, it keeps it ticked on "Dernier mois disponible".

 

The problem is when I change the year selected in the report, the month of March for example which is the last month loaded in 2020 is still name "Dernier mois disponible" in 2019, it is not possible to keep it like this 😞

I tried adding the year in the condition of my formula : 

=if(SecuriteAuTravail[Dernier_mois_dispo]=SecuriteAuTravail[mois_x] && SecuriteAuTravail[derniere_annee_dispo]=SecuriteAuTravail[Annee];"Dernier mois disponible";SecuriteAuTravail[Mois])

 

But doing like this, it displays March + Dernier mois disponible as 2 different months in the filter, so not ok neither...

If you have an idea, I will be glad 😉

 

THanks a lot, AnSo

Anonymous
Not applicable

Hi mwegener, 

 

I will try your solution but reading it I am wondering what you mean by "put the default filter on the current date".

Because if I add a filter on the "actual day" in the filter pane, I won't be able to change the period selection anymore in the report, will I ?

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors