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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ElioXh
Regular Visitor

DAX - Filter All Columns from a Table Based on What-If Parameter

I have a table named "RunData" with dozens of columns, which I'd like to filter based on the value in the "RunNum" column based on a what-if parameter slider slicer. The result needs to be a table because are multiple rows that match the parameter, and I'd like the data from all the columns in the original table.

So I'd like to dynamically extract a subset of rows from my original table when I change the slider.

 

Creating a measure 

 

Measure = SELECTEDVALUE('RunData'[RunNum]) = 4

 

 and then a table based on that measure defined as 

 

FilteredTable = Filter('RunData',[Measure])

 

 works exactly as intended.

 

But updating the measure to not have the filter value hard coded (i.e. 4) but rather be the output of the what-if parameter breaks the functionality.

 

Following option all result in an empty FilteredTable:

Measure = SELECTEDVALUE('RunData'[RunNum]) = SELECTEDVALUE(RunFilter[RunFilter])
Measure = SELECTEDVALUE('RunData'[RunNum]) = RunFilter[RunFilterValue]

Thank you for your help

2 REPLIES 2
Anonymous
Not applicable

Hi @ElioXh ,

 

According to your description, I understand that you want to filter the table by measure with parameter. Unfortunately, New table Functions does not dynamically change as the measure changes. However, you can create a new table and use What-If Parameter to filter the data in the table.

 

You can follow these steps:

1.Add a parameter

vyifanwmsft_0-1703041376785.png

2.Add a measure

Measure =

IF (

    SELECTEDVALUE ( RunData[RunNum] ) = [Parameter Value],

    'Parameter'[Parameter Value],

    BLANK ()

)

 

Final output:

 

vyifanwmsft_1-1703041441354.png

 

vyifanwmsft_2-1703041441355.png

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Yifan Wang

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

Hi Yifan,

 

Thanks for your help, a sample pbix showcasing the issue can be dowloaded at the following link.

DynamicFilter.pbix 

 

Applying the parameter to a single column works exactly as intended, and can be driven by the parameter slider, but the issue for my end use-case is I have over 300 columns in my table, and defining measures for each column is not viable. Which is why I want to create a subset table of my original table, containing only the filtered rows of interest.

 

If I define a filtered table as below, this works exactly as desired:

FilteredTable = FILTER(RunData,RunData[RunNum]=4)

 

But if I try and link the filter to use the parameter, that yields a blank table.

FilteredTable = FILTER(RunData,RunData[RunNum]=SELECTEDVALUE(Parameter[Parameter]))

 

Is there a way to create the subset table in a way that can be updated based on a parameter?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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
Top Kudoed Authors