Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe'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
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).
I
Thank you in advance
Solved! Go to Solution.
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}))
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}))
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 6 | |
| 5 |