Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext 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
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.
| Person | Qual1 | Qual2 | Qual3 |
| Joan | X | ||
| John | X | X | |
| Shari | X |
Seems like creating a table like this would work, but I'm not sure how to do it:
| Person | Qual |
| Joan | Qual1 |
John | Qual1 |
| John | Qual2 |
| Shari | Qual3 |
Solved! Go to Solution.
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:
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,
@richard_thurau Unpivot your three columns in Power Query and then you should be good.
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.
@richard_thurau Unpivot your three columns in Power Query and then you should be good.
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:
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,
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |