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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
JGARROD
Helper I
Helper I

Filter a table by a parameter

Hi, 

 

I have a table which is being profilied, as such another table has been created which does a number of thing such as count distinct, distributon of value etc for all columns of the underlying table. I need to be able to initially filter the underlying table (there is one column called Stautus which is active/inactive). I think i need to use parameters and a filter on said (inactive/active) column. However i want the user to be able to select Active or Inactive or 'Both' and then for it to filter the tbale however i dont know how to get the parameter to pass the wildcard of 'both inactive or active' to the column filter. 

 

Any help would be much apprecited. 

1 ACCEPTED SOLUTION
ToddChitt
Super User
Super User

I have never tried this so just guessing here:

Add a derived column in Power Query and concatenate the Status column with the literal ", Both" so now that column contains values like "Active, Both" or "Inactive, Both". Filter on that column with a CONTAINS comparison against the Parameter value. 

This may fail depending on if the comparison engine thinks that "Active" is CONTAINED in "Inactive, Both" even though it is a capital A versus a small a. But I *think* Power Query is CASE Sensitive.

Try it and let us know how it goes.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
JGARROD
Helper I
Helper I

Yep this was it, it came to me when i tried to use numbers rather than words and also the 'CONTAINED' so ive ended up with a column with two values 'All Active, All Inactive' and then a Parameter with 3 values : All, All Inactive, All Active. 

 

By using the contains on the filter i can filter by All, or by individual. 

ToddChitt
Super User
Super User

I have never tried this so just guessing here:

Add a derived column in Power Query and concatenate the Status column with the literal ", Both" so now that column contains values like "Active, Both" or "Inactive, Both". Filter on that column with a CONTAINS comparison against the Parameter value. 

This may fail depending on if the comparison engine thinks that "Active" is CONTAINED in "Inactive, Both" even though it is a capital A versus a small a. But I *think* Power Query is CASE Sensitive.

Try it and let us know how it goes.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.