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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
rzer
New Member

Help with transforming data

Hello,

 

I have an Excel file that needs to be transformed and I am running into issues. I have provided an example of it below. I need to combine the first row into one column and the name will be "Courses". I then need to combine the completed, due, and system into 3 separate columns. Then, each name should therefore be duplicated for each course. So in the example, there should be four rows (2 for each name) and 6 columns (name, section, course, completed, due, and system).

 

rzer_0-1707947840324.png

 

Thank you in advance 

 

1 ACCEPTED SOLUTION
wdx223_Daniel
Community Champion
Community Champion

1 import your data into Power Query Editor without headers

2 input below code as a new step after your import

=let a=Table.ToRows(PreviousStepName) in #table({"Name","Section","Course","Due","Completed","System"},List.TransformMany(List.Skip(a,2),each List.Split(List.Skip(List.Zip({a{0},_}),2),3),(x,y)=>List.FirstN(x,2)&{y{0}{0}}&List.Zip(y){1}))

View solution in original post

1 REPLY 1
wdx223_Daniel
Community Champion
Community Champion

1 import your data into Power Query Editor without headers

2 input below code as a new step after your import

=let a=Table.ToRows(PreviousStepName) in #table({"Name","Section","Course","Due","Completed","System"},List.TransformMany(List.Skip(a,2),each List.Split(List.Skip(List.Zip({a{0},_}),2),3),(x,y)=>List.FirstN(x,2)&{y{0}{0}}&List.Zip(y){1}))

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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