Forum Discussion
How to pivot a table into slicer
Hi All,
I would like to create a slicer with this date set.
| Item | Problem A | Problem B | Problem C |
| 1 | Fail | Fail | Fail |
| 2 | Pass | Fail | Pass |
| 3 | Fail | Pass | Fail |
| 4 | Pass | Pass | Fail |
| 5 | Fail | Fail | Pass |
I am hoping to build a slicer to see which items are under Problem A or B or C.
For example,
when I select "Problem A' in the slicer, it could filter the failed items: 1,3,5
when I select "Problem B' in the slicer, it could filter the failed items: 1,2,5
when I select "Problem C' in the slicer, it could filter the failed items: 1,3,4
Appreciated if you have any idea.
4 Replies
- Greg_Deckler
Community Champion
ngct1112 In Power Query Editor, select your three problem columns and then right-click and unpivot.
- ngct1112
Post Patron
Greg_Deckler , since my "ProblemA,B,C" columns are built by add column.
Do you have any idea to make it workable by measure?Thanks
- amitchandak
Super User
ngct1112 , Create a measure like
Countrows(Filter(Table, Switch(True() ,
selectedvalues(Slicer[Sclier]) ="Problem A", Table[Problem A] = false() ,
selectedvalues(Slicer[Sclier]) ="Problem B", Table[Problem B] = false() ,
selectedvalues(Slicer[Sclier]) ="Problem C", Table[Problem C] = false()
))
- ngct1112
Post Patron
amitchandak thanks for that, but it seems not working since I just have the dataset which those "Problems" are in different columns. And I could not selectvalue because they are not yet in a slicer.