Forum Discussion

haniizz's avatar
haniizz
Helper II
3 years ago
Solved

converting multiple columns to rows

hello guys , I have this table as a dataset for a survey collected from 11 respondents   respondent best color / red best color / orange best color / yellow best color / green 1 0 0 ...
  • djurecic's avatar
    3 years ago

    Hi haniizz ,

    After loading your data, click Transform Data to open the Power Query Editor.

    Then CTRL+Click to select all of the color columns and click Unpivot Columns.

    Click Close & Apply to close the Power Query Editor.

     

    The next step is not strictly necessary, but click "New Measure" and create a measure like below (adjust for your table and column names)

    SumValue = SUM(Colors[Value])
     
    Then add a clustered column chart like below
     
    The chart will look something like this:
     
    Please accept as solution if you think this has answered the question.