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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors
Top Kudoed Authors