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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
asjones
Helper V
Helper V

Advanced Filtering - Dynamic Filter Based on Field Value

I would like to do an Advanced Visual Filter and/or page Level Filter based on a field in a table/record with single row (thus filter on a field).  Example the table might have a field called [table]day = 14.  The Advanced filter would filter on values  <= [table]day.   That in one case might be 14 and then later 16 etc.

 

However the advanced filter contains/is/greater than/less than/etc. only look to be able to format to work on hard coded values.

 

Any thoughts?

 

thanks

 

Alan

4 REPLIES 4
MattAllington
Community Champion
Community Champion

It's not really clear what you want. Tables have columns and rows.  Do you mean you want to filter a column called table[day] <=14 ?  If the column only has a single value/row, why do you need this filter?



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

@MattAllington

 

 

 

Sorry for the delay in responding. I realized I did not add enough detail to my original post (normally I go into to0 much detail).  I have multiple tables (at least 2). I have started in a few cases having a an extra table generated that has information about my data that was exported from our ERP system. It has a single row and a column for each item. It has columns on the date/time the data was pulled, what environment (test vs production), various parameters used in the export of the data form our ERP to the file Power BI will use to import the data. Some of I use as my own checks and reminders. Although displaying dates/times to the user has been helpful to the consumers of the report.

 

So I have my normal "data tables" and this "parameter table".  Still don't have a good name for it.

 

I would like to do an Advanced Visual Filter and/or page Level Filter based on a field in the parameter table/record (thus filter on a field from one table to affect display of another).  Example the parameter table might have a field called [table]day = 14.  The Advanced filter would filter on values  <= [table]day.   That in one case might be 14 and then later 16 etc.  So the data table would only display stuff on or before a day passed to a filter from a parameter in another table.

 

 However the advanced filter contains/is/greater than/less than/etc. only look to be able to format to work on hard coded values.

 

 Thanks for your time and help on this

 

Alan

 

 

 

Write a measure to "harvest"  The selected date from your parameter table 

 

selection = max(parametertable[date])

 

 Then write to measure that will return a value for any date greater than its harvester measure 

display = calculate(countrows(data),filter(data,data[date] <= [selection]))

 

place the data you want to see in a table along with this measure. I think it will work. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Hi MattAllington,

 

You are definitely a genius!!! This works brilliantly. Thanks ever so much.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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