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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
haniizz
Helper II
Helper II

converting multiple columns to rows

hello guys , I have this table as a dataset for a survey collected from 11 respondents

 

respondentbest color / redbest color / orangebest color / yellowbest color / green

1

0010
21000
31000
41000
50100
61011
70110
80001
90010
100100
110100

 

how can load this data that will allow me to analyse it like the table below

 

best colorresponses
red4
orange4
yellow4
green2

 

 

and allow me to visualise it like this chart

 

haniizz_0-1668101099134.png

 

I hope I simplified my  question

1 ACCEPTED SOLUTION
djurecicK2
Super User
Super User

Hi @haniizz ,

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

Transform data.png

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

Unpivot.png

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
Clustered.png
 
The chart will look something like this:
Chart2.PNG
 
Please accept as solution if you think this has answered the question.

View solution in original post

2 REPLIES 2
djurecicK2
Super User
Super User

Hi @haniizz ,

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

Transform data.png

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

Unpivot.png

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
Clustered.png
 
The chart will look something like this:
Chart2.PNG
 
Please accept as solution if you think this has answered the question.

thank you dj for you prompt response, that's helpful 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.