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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Neil_Cooper
Helper I
Helper I

Rearranging survey data to from columns to rows

Hi Everyone

 

I wonder if you can help?  I have survey data I am trying to organise into a table showing the top 3 areas and the bottom 3 areas (based on average scores for each question) in separate tables.  Whilst this in theory sounds easy enough I am finding that as these are on separate columns in the example below I am finding this doesnt work in Power BI for two reasons.  Firstly it brings the ratings into the rows and secondly the top N cannot be used as these are all separate columns.

 

Neil_Cooper_0-1598441419694.png

 

What I need is this:

Neil_Cooper_1-1598441588463.png

 

I wonder if there is a way of reorganising the data in Power BI to achieve this.  

 

Hope this makes sense and many thanks in advance 🙂

 

Best wishes

 

Neil 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

In the query editor, highlight your first two columns, and right click and choose Unpivot Other Columns.  Load that table, and you can make a table or matrix to get your result with the Attribute column (or whatever you rename it to) and the average of the Value column.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

4 REPLIES 4
mahoneypat
Microsoft Employee
Microsoft Employee

In the query editor, highlight your first two columns, and right click and choose Unpivot Other Columns.  Load that table, and you can make a table or matrix to get your result with the Attribute column (or whatever you rename it to) and the average of the Value column.

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thank you so much!  This is genius 😊  I would have not figured this out on my own so thank you so much.  It's so simple and did just the trick!  Really appreciate it, your a lifesaver!

amitchandak
Super User
Super User

@Neil_Cooper , Not very clear, You can unpivot

https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

My apologies if this wasn't clear it is a tricky one to explain.  Really appreciate you sending the response over.  I was able to use the unpivot other columns and then use the attritubes to get the results I needed.

 

Best wishes

 

Neil

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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