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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Super User
Super User

@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!:
Power BI Cookbook Third Edition (Color)

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

))

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors