Forum Discussion
How to create multi-column slicer to filter a pivot table ?
Hi,
I have a data in excel sheet in pivot table format:
| Users | A | B | C | D | E |
| Prasad | 1 | 0 | 0 | 1 | 0 |
| Ramana | 0 | 1 | 0 | 0 | 1 |
| Venkat | 0 | 1 | 1 | 0 | 1 |
| Dave | 1 | 0 | 0 | 1 | 1 |
| Uday | 1 | 1 | 1 | 0 | 0 |
I want a multi-column slicer so that the user can filter records with any combination of A, B, C, D and E columns.
Example
A = 1 and B = 0 and C = 0 O/P: No. of users: 2 (Prasad, Dave)
B = 1 and E = 1; No. of users:2(Ramana, Venkat)
Could someone help how to achieve this in Power BI?
Thanks in advance.
3 Replies
- Greg_Deckler
Community Champion
Thinking about this some more, why can't you just use 5 slicers, one for each column?
To use the Patient Cohort Quick Measure I believe you are going to need to unpivot your 5 columns and then combine the two resulting columns so that you get something like:
Prasad A - 1
Prasad B - 0
Prasad C - 0
...
Haven't tried it yet with your data but I think that's one way to approach it.
- Greg_Deckler
Community Champion
Check out my Patient Cohort Quick Measure here: https://community.powerbi.com/t5/Quick-Measures-Gallery/Patient-Cohort/m-p/391883
It's essentially an AND slicer, instead of OR. Might work for you with some fiddling.
- v-jiascu-msft
Microsoft Employee