Forum Discussion

kat_pbi's avatar
kat_pbi
New Member
5 years ago

Single drop down slice for different bar chart visualization of each field

Hi everyone, I am new to power BI and I have been trying to figure out how to make single drop down slicer visualizing a bar chart for selected fields.

 

I would like to visualize each field below in a bar chart but using a single dropdown slicer only: 

Example table:

What fences do you have?Type of home do you live in?Any security systems?
No ResponseUnit/TownhouseNo Response
No ResponseHouseYes
Front fence, Side fence(s), Rear fenceUnit/TownhouseYes
Side fence(s), Rear fenceFarmYes
Side fence(s), Rear fenceHouseNo

 

Example dropdown slicer:

 

 

 

Would appreciate any help. Thank you!

 

4 Replies

  • Icey's avatar
    Icey
    Community Support

    Hi kat_pbi ,

     

    I agree with Greg_Deckler . Please try to UnPivot your columns.

     

    In addition, if his reply helps, please consider Accept it as the solution to help the other members find it more quickly.

     

     

    Best Regards,

    Icey

     

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    kat_pbi So in general you are going to want everything to be unpivoted so that you wend up with a single column with your questions in it and another column with your answers. I don't see the full dataset so hard to tell you exact steps in Power Query. Alternatively you could have a disconnected table with your questions in it but that is going to make the calculations far more difficult.

     

    So like:

     

    ResponseID,QuestionID,QuestionText,Score

    1,Question1,This is a question,10

    1,Question2,This is another question,3

    2,Question1,This is a question,10

    2,Question2,This is another question,3

    3,Question1,This is a question,10

    3,Question2,This is another question,3

     

    You do NOT want:

     

    ResponseID,Question1Text,Question1Score,QuestionIDText,Question2Score,Question3Text,Question3Score...

     

    Not sure how much more specific I can be given the information. @ me in replies.

    • kat_pbi's avatar
      kat_pbi
      New Member

      Hi Greg_Deckler i wanted to visualize barcharts from different columns but using one drop down slicer only to interchange the barcharts. Is it still the same process?