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
Giada_Togliatti
Post Patron
Post Patron

filter with default open to last date

Hi,

I have a filter with field date.

Is it possibile to setting up a default open to a filter as last date available so if the database updates if I open the workbook I have always the last date selected?

 

Thank you

4 REPLIES 4
Naash
Frequent Visitor

First you need to create a measure that selects the latest date value and then use this measure as an input to create a calculate column in power bi

 

Measure
max_date= 

CALCULATE(LATEST_DATE(Data[Date]),ALL(Data))
 
Calculated Column
recent_date=
if([max_date]=Data[Date],"Latest_Data","Historic_Data")
 
And then you can use this column as a value in "Filter on this page" over the Filter section and select the default value as "Latest_Data" and lock the filters. By doing so the only the recent data would be displayed
amitchandak
Super User
Super User

@Giada_Togliatti , You can have a column like this in date table

 

Is Max= if('Date'[Date]=max(Table[Date]),"Last Date",[Date]&"")

 

You can select last date -Last Date

 

You can sort this column on Date

@amitchandak, could you send me a sample workbook with the solution, please?

 

Hi @Giada_Togliatti ,

It is currently impossible to achieve if set the maximum date as the default option for the filter or slicer directly. You can refer the solution in the following threads as workaround to achieve it.

Default slicer selection(Latest date) in Power BI

Select latest date in Slicer

max value selected in date slicer

In addition, here is one similar idea shared on Power BI Ideas, you can vote it up and add your comments there to improve Power BI on this feature. You can also raise a new one.

Best Regards
Rena
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.

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

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.