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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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