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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Power BI Query Dynamic Filter

HI,

 

Hope you are doing well. I have a small query in Power BI.

 

Data source: Oracle SQL in import mode.

 

My customer wants to create a filter based on a date that only shows the data for yesterday and today's date.

So for example :

If we have a date column from 01/01/2019 ----31/12/2020

 

The customer should see only 31/12/2020 and the day before ( 30/12/2020) by default.

And after that, if they want they can move the filter and changes the date to see the historical data. (The data from previous years: 2019)

I managed to make that filter by the logic: Max date and Max Date-1 but for a moment it is static and not dynamic.The filter should be on creation dateThe filter should be on creation date

 

 

The filter should be on the creation date.

 

Any idea how to achieve this?

 

Thanks 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous 

 

You cannot make the data dynamic change to latest 2 days by default meanwhile allow you to change to others dates. 

 

For your requirement, you may follow the workaround:

1. Create 2 same tables.

2. Set a visual filter with TOP N filter to one table, the table will always display the latest 2 days' data.

3. Using the "Edit Interaction" feature to turn off the interaction between the Slicer and the filtered table.

4. You just the Slicer to change to others dates to show corresponding data in the other table.

 

TOP N and change dates.JPG

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

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@Anonymous 

 

You cannot make the data dynamic change to latest 2 days by default meanwhile allow you to change to others dates. 

 

For your requirement, you may follow the workaround:

1. Create 2 same tables.

2. Set a visual filter with TOP N filter to one table, the table will always display the latest 2 days' data.

3. Using the "Edit Interaction" feature to turn off the interaction between the Slicer and the filtered table.

4. You just the Slicer to change to others dates to show corresponding data in the other table.

 

TOP N and change dates.JPG

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

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.