Latest Enterprise DNA Initiatives

Filter Table based on Column heading Filter

Guys, Am looking for advice on how to Filter table result based on the Selecting the Column Name in the filter dropdown.

The below Sample data and screenshot is what am looking to achieve in Power BI.

Any support on this is appreciated…Thank in Advance.

Sample Data :

ID Name Status Country Hired From Department Type
121 Merritt Aydin Active India IJP HR Contract
122 Spear Robert Active USA LinkedIN HR Trainee
123 Willard James Active LATAM External Finance FTM
124 Tot Maria Active India IJP IT Contract
125 Wells Paul Active USA LinkedIN HR Trainee
126 Collier Matilda Active India External HR FTM
127 Ramjac Wolfgang Active USA IJP Finance Contract
128 Ramsy Peter Active USA LinkedIN IT Trainee
121 Aydin Active India External HR FTM
122 Robert Active USA External HR Trainee
123 James Active LATAM External Finance FTM
124 Maria Active India LinkedIN IT Trainee
125 Paul Active USA LinkedIN Legal FTM

Looking for similar Solution in Power BI




Hi Dharma,

Maybe something like this could work for you:

In Power Query, create two tables referencing your sample data:
1: Your filter table, fetching the column headers using
Table.FromList(Table.ColumnNames(#“Sample Data”)),
and then maybe filtering out ID, Name and other categories you don’t need. Rename the column to Attributes.
2: A version of your sample data, where you unpivot all the filter columns: Table.UnpivotOtherColumns(#“Sample Data”, {“ID”, “Name”}, “Attribute”, “Value”)

When loaded to the model, create a relationship between the two tables’ “Attributes” columns

Write the following measure: Count = IF( COUNTROWS(‘Filter’)=1, DISTINCTCOUNT(‘Sample Data Unpivoted’[ID]))

(Edit: Sorry, I was too sloppy… I guess it should have been COUNT(‘Sample Data Unpivoted’[Name]) to replicate your results. But the principle is the same)

You should now hopefully be able to make a table and a slicer:

See the attached pbix for details.
EDNA_dharma_210831.pbix (39.0 KB)

If not perfect, I hope it may at least help you in the right direction. All the best!



Hi @Dharma, did the response provided by @tholstrup help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query. Thanks!

Hi @Dharma, we’ve noticed that no response has been received from you since Sep 1.

We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Hi @Dharma, due to inactivity, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please create a new thread.