Forum Discussion
Using column headers as slicers
Hello,
I am looking to produce a report which compares the amount of project types an organisation has delivered & also compares how well they have scored on our assessment, whilst being able to filter by items such as discipline.
Please see example table of how our data is formatted.
| Company Name | Discipline | Score | Residential | Commercial | Education |
| Company 1 | Architect | 3 | 10 | 3 | 5 |
| Company 2 | Structural | 4 | 5 | 12 | 3 |
| Company 3 | MEP | 2 | 12 | 5 | 6 |
All the data is currently producing the required output, bar the project types (3 right-hand columns)
How can I create a slicer which uses column names as headings for the project type columns (Residential, Commercial, Education)? I have been looking online for a week and can't seem to resolve this, I assume I'm not the first person to face this issue.
Thanks in advance.
1 Reply
- HotChilliCommunity Champion
You can Unpivot the 3 columns in Power Query. After that, create a Dimension table consisting of the unique values (You can just create this with 'Enter Data' ) and link that 1:m in relationships.
---
Now, this is a well-known approach to this type of problem but you need to be aware that you can get yourself in trouble if you had certain measures which worked before , for example, a COUNTROWS measure before would show 3 but now you have 9. This is not a problem you just have to be aware of how the data is structured when writing measures.