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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
richard_thurau
New Member

Select values in one field based on values in other fields

Hello,

I have a table of people and qualifications. Each qual is indicated by an "X" in the qualification field. 

I'd like to create a user slicer where I could select all the people with one or more qualifications.

I'm pretty sure this is a data transformation problem, but I can't get my head around what exactly to do.

 

I'd like to filter "Qual 1" which would return Joan and John. 

Filtering Qual 2 OR Qual 3 would return John and Shari. 

 

Thanks for your time.

 

PersonQual1Qual2Qual3
JoanX  
JohnXX 
Shari  X

 

Seems like creating a table like this would work, but I'm not sure how to do it:

PersonQual
JoanQual1

John

Qual1
JohnQual2
ShariQual3
2 ACCEPTED SOLUTIONS
DataNinja777
Super User
Super User

Hi @richard_thurau ,

 

You’ve got a table of people and their qualifications, with each qualification represented as a separate column. An "X" means that person holds that qualification. The issue is that this wide table structure isn’t very slicer-friendly in Power BI—you can’t easily say “show me everyone with either Qual2 or Qual3,” because those qualifications are stuck in their own columns.

To fix that, we need to reshape the data into a more analysis-friendly format, where each row is a unique person/qualification combination. This makes it easy to filter by any qualification and automatically return the people who have it. You’re basically turning columns into rows. Here’s how you do that in Power Query.

Open Power Query and use this transformation logic:

let
    Source = YourTableNameHere,
    Unpivoted = Table.UnpivotOtherColumns(Source, {"Person"}, "Qualification", "Value"),
    Filtered = Table.SelectRows(Unpivoted, each [Value] = "X"),
    Cleaned = Table.RemoveColumns(Filtered, {"Value"})
in
    Cleaned

What this does:

  • UnpivotOtherColumns collapses all the Qual1, Qual2, and Qual3 columns into two columns: one for the qualification name, and one for the "X" or blank.
  • Then we filter out the blanks, keeping only rows where the value is "X".
  • Finally, we drop the "Value" column since it’s no longer needed (it was just used for filtering).

The result will be this nice, clean table:

 

Person Qualification
Joan Qual1
John Qual1
John Qual2
Shari Qual3

With this new table, you can create a slicer on the Qualification field, and it’ll filter your visuals to show only the people who have the selected qualification(s). For example, if you select Qual1, it’ll show Joan and John. If you select Qual2 or Qual3, it’ll show John and Shari.

Now you’ve turned a spreadsheet that was a bit awkward to analyze into a sleek, responsive data model.

 

Best regards,

 

 

View solution in original post

Greg_Deckler
Community Champion
Community Champion

@richard_thurau Unpivot your three columns in Power Query and then you should be good.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
richard_thurau
New Member

Nicely demonstrated and explaine. I ended up just using the GUI tools in Power Query to carry out these steps, but this was the explanation my brain needed! 

Thank you.

Greg_Deckler
Community Champion
Community Champion

@richard_thurau Unpivot your three columns in Power Query and then you should be good.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
DataNinja777
Super User
Super User

Hi @richard_thurau ,

 

You’ve got a table of people and their qualifications, with each qualification represented as a separate column. An "X" means that person holds that qualification. The issue is that this wide table structure isn’t very slicer-friendly in Power BI—you can’t easily say “show me everyone with either Qual2 or Qual3,” because those qualifications are stuck in their own columns.

To fix that, we need to reshape the data into a more analysis-friendly format, where each row is a unique person/qualification combination. This makes it easy to filter by any qualification and automatically return the people who have it. You’re basically turning columns into rows. Here’s how you do that in Power Query.

Open Power Query and use this transformation logic:

let
    Source = YourTableNameHere,
    Unpivoted = Table.UnpivotOtherColumns(Source, {"Person"}, "Qualification", "Value"),
    Filtered = Table.SelectRows(Unpivoted, each [Value] = "X"),
    Cleaned = Table.RemoveColumns(Filtered, {"Value"})
in
    Cleaned

What this does:

  • UnpivotOtherColumns collapses all the Qual1, Qual2, and Qual3 columns into two columns: one for the qualification name, and one for the "X" or blank.
  • Then we filter out the blanks, keeping only rows where the value is "X".
  • Finally, we drop the "Value" column since it’s no longer needed (it was just used for filtering).

The result will be this nice, clean table:

 

Person Qualification
Joan Qual1
John Qual1
John Qual2
Shari Qual3

With this new table, you can create a slicer on the Qualification field, and it’ll filter your visuals to show only the people who have the selected qualification(s). For example, if you select Qual1, it’ll show Joan and John. If you select Qual2 or Qual3, it’ll show John and Shari.

Now you’ve turned a spreadsheet that was a bit awkward to analyze into a sleek, responsive data model.

 

Best regards,

 

 

Helpful resources

Announcements
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.