Forum Discussion

travbum's avatar
travbum
Advocate I
9 years ago
Solved

Data from multiple columns in one visual

I have a survey question:

Which of these did you do:

A) I did A

B) I did B

C) I did C

 

which results in a table:

I did AI did BI did C
TRUETRUE 
 TRUETRUE
   
TRUETRUE 
 TRUETRUE

 

 

How could I turn this into a bar chart?

 

  • Another way is:

     

    Step 1

     

    Go to Edit Queries

     

    Select your columns with answers.

     

    Transform - Unpivot Columns

     

    Step 2

     

    In the bar chart put Attribute (You can change the name to Question or another) in axis and Values(You can change the name to answer or another) in Value section

     

5 Replies

    • travbum's avatar
      travbum
      Advocate I

      Ah, that is not how I thought to do that. Thanks! How would I get a legend in there? All I have in the legend now is "Count of Q1_A", "Count of Q1_B","Count of Q1_C"

      • Vvelarde's avatar
        Vvelarde
        Community Champion

        travbum

         

        you need to create a measure for each column:

         

        A = CALCULATE(COUNTROWS(Survey),Survey[I did A]=True)

        B = CALCULATE(COUNTROWS(Survey),Survey[I did B]=True)

        C = CALCULATE(COUNTROWS(Survey),Survey[I did C]=True)