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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
pranaysharmadel
Regular Visitor

Transpose grouped columns

I'm trying to transpose rows into columns for a given group.

My initial table looks like this with 13 columns 

GivenSurnamecompanyLiveemailContract StartContract EndInstructor CostLMS Course IDCourse TitleSMIPSectionStart DateEnd Date

pranaysharmadel_1-1680236183337.png

 

 

The final table groups rows by these columns - "Given Surname company Liveemail Contract Start Contract End".

The remaining columns gets appended to the same row with a suffix 1,2,3 added like this.

So, the final table looks like this - 

pranaysharmadel_2-1680236414029.png

This is the power query I have so far.

#"Grouped Rows" = Table.Group(#"Changed Type", {"Given", "Surname", "company", "Liveemail", "Contract Start", "Contract End"}, {{"crscount", each Table.RowCount(_), Int64.Type}}),

The columns need to be dynamic, if there are 100 rows for a given group, there need to be 100 sets of columns added to the main table like "LMS Course ID1 Course Title1 SMIP1 Section1 Start Date1 End Date1" all the way to  "LMS Course ID100 Course Title100 SMIP100 Section100 Start Date100 End Date100"

How can I have the columns added in end of the grouped row?

 

 

2 REPLIES 2
BA_Pete
Super User
Super User

Hi @pranaysharmadel ,

 

The real question is: Why do you want to do this with your data? You're moving it away from the optimal structure for storage and reporting.

It sounds like an XY Problem to me. Can you explain what you're actually trying to achieve with your data and output please?

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Its the business need. External systems are consuming the file. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Kudoed Authors