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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ngct1112
Post Patron
Post Patron

How to pivot a table into slicer

Hi All,

 

I would like to create a slicer with this date set.

ItemProblem AProblem BProblem C
1FailFailFail
2PassFailPass
3FailPassFail
4PassPassFail
5FailFailPass

 

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 4
Greg_Deckler
Community Champion
Community Champion

@ngct1112 In Power Query Editor, select your three problem columns and then right-click and unpivot.



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...

@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
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()

))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@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.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors