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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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