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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sharc316
Helper I
Helper I

Date Filter Last 7 Days From Max Date

Hi,

 

I would like to set the date range filter default value to display last 7 days starting from max date in the available data.

Can anyone suggest how this can be done?

 

Thank you for your help.

2 REPLIES 2
GilbertQ
Super User
Super User

Hi @sharc316

 

There are multiple ways to do this.


If you have a date table, you could create a column in the Query Editor which will look at the Max Date, and then go back 1 week or 7 days. And then you give this new column a value for example of "Last 7 Days" and for the else part you use "Older than 7 Days"

Then once this loads you can then use this column in your filter.

 

Another option is to do it using a measure, using the DATEDIFF





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

Proud to be a Super User!







Power BI Blog

Thank you for the help. Will give it a try.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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