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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
SAEDG
Frequent Visitor

Transpose or Upivot?

Hello everyone,

I am hoping someone can help me with transposing or unpivoting some columns.

I am basically trying to turn this:

 

SAEDG_1-1681765581693.png

 

Into this in Power Query Editor

 

SAEDG_0-1681766550690.png

 

I've tried unpivoting a few different ways, but no luck with attaching the reponse and the commentary to the same Question and ID.

 

Any help would be appreciated. 

Thanks!

1 ACCEPTED SOLUTION
DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

  1. First i'd duplicate the table,
  2. In one table delete all of the comment columns
  3. In the 2nd table delete all the question response columns and rename the comment columns to remove the word comment - they should match the column headings of the questions in table one.
  4. In each table select only the columns now labed with question # and select unpivot
  5. Select one of the tables and merge the other into it joining on the ID and qestion number
  6. Expand the column to bring in only the value field of the other table.

Hope this helps,

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

View solution in original post

3 REPLIES 3
SAEDG
Frequent Visitor

This worked perfectly, thank you!

No problem, happy to help 🙂

DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

  1. First i'd duplicate the table,
  2. In one table delete all of the comment columns
  3. In the 2nd table delete all the question response columns and rename the comment columns to remove the word comment - they should match the column headings of the questions in table one.
  4. In each table select only the columns now labed with question # and select unpivot
  5. Select one of the tables and merge the other into it joining on the ID and qestion number
  6. Expand the column to bring in only the value field of the other table.

Hope this helps,

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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