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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
mterry
Helper V
Helper V

Merging rows and using row values as both column headers and row values

I have a table that has a column filled with questions, and another column with applicable respoonses to those questions. I'm hoping I can transform this table using Power Query so that each question is a column header and the value in that column is the response. A sample of the table as-is now and what I'd like for it to look like is posted below:

Table now:

CompanyQuestionResponse
AcmeQuestion 1Yes
AcmeQuestion 2No 
AcmeQuestion 350
AcmeQuestion 4Blue

 

My desired result:

CompanyQuestion 1Question 2Question 3Question 4
AcmeYesNo50Blue
1 ACCEPTED SOLUTION
ronrsnfld
Super User
Super User

Just Pivot with no aggregation

 

Table.Pivot(#"Previous Step", List.Distinct(#"Changed Type"[Question]), "Question", "Response")

 

View solution in original post

4 REPLIES 4
Akash_Varuna
Super User
Super User

Hi @mterry , Could you please try this 

  • Select "Company" as the grouping column, "Question" as the column to pivot, and "Response" as the values.
  • Go to the "Transform" tab and click "Pivot Column."
  • In the dialog, set "Values Column" to "Response" and "Column to Pivot" to "Question."
    If this post helped please do give a kudos and accept this as a solution
    Thanks In Advance

 

Thanks for the response - I didn't get a chance to try as the previous response worked. 

ronrsnfld
Super User
Super User

Just Pivot with no aggregation

 

Table.Pivot(#"Previous Step", List.Distinct(#"Changed Type"[Question]), "Question", "Response")

 

Thanks this worked!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.