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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
akoconnor
New Member

newbie transformation question

Hello!  New to PQ and I may not have the proper vocabulary to ask this, possibly, simple question.

 

I have been given data that is iteritive in rows. I know I need to transform it but everything I try is not quite right. In the data below, for each question I would like to have a seperate column, but only one row for Sofia and her answers in the correct column. Thoughts?

 

What I have:

NameQuestionAnswer
SofiaInstitution: - (MQ0194)UAB
SofiaDepartment/Division: - (MQ0195)Neurobiology
SofiaRegistrant type: - (MQ0196)Faculty: Instructor, Assistant Professor, Associate Professor, or Professor
SofiaPlease select your mentor from this list of Cancer Center Members: - (MQ0197)Sofia  NO
SofiaWill you be presenting a poster at this year's retreat? - (MQ0198)No
SatoruInstitution: - (MQ0194)UAB
SatoruDepartment/Division: - (MQ0195)Neurosurgery
SatoruRegistrant type: - (MQ0196)Faculty: Instructor, Assistant Professor, Associate Professor, or Professor
SatoruPlease select your mentor from this list of Cancer Center Members: - (MQ0197)Erwin  NO
SatoruWill you be presenting a poster at this year's retreat? - (MQ0198)No

 

What I want:

NameInstitution: - (MQ0194)Department/Division: - (MQ0195)Registrant type: - (MQ0196)Please select your mentor from this list of Cancer Center Members: - (MQ0197)Will you be presenting a poster at this year's retreat? - (MQ0198)
SofiaUABNeurobiologyFaculty: Instructor, Assistant Professor, Associate Professor, or ProfessorSofia  NO

No

 

SatoruUABNeurosurgeryFaculty: Instructor, Assistant Professor, Associate Professor, or ProfessorErwin NONo

 

1 REPLY 1
ronrsnfld
Super User
Super User

This is a simple Pivot on the Question column with No Aggregation

From the UI:

ronrsnfld_0-1689202039220.png

 

Code from Advanced Editor

 

let

//Change next line to reflect actual data source
    Source = Excel.CurrentWorkbook(){[Name="Table21"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Question", type text}, {"Answer", type text}}),
    
    #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Question]), "Question", "Answer")
in
    #"Pivoted Column"

 

ronrsnfld_1-1689202283471.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors