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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I need help in to assemble data in below manner
Problem
| Column1 | Column6 | Column7 | Column8 | Column9 |
| Sep 2020 | Function | Queue | Queue | Queue |
| Sep 2020 | Priority | P1 | P1 | P1 |
| Sep 2020 | Team | Member | Insurance | Pension |
| Sep 2020 | Team Target Coverage | 1 | 0.9 | 0.9 |
| Oct 2020 | Function | Queue | ||
| Oct 2020 | Priority | P1 | P1 | P1 |
| Oct 2020 | Team | Member | Insurance | Pension |
| Oct 2020 | Team Target Coverage | 1 | 0.9 | 0.9 |
| Nov 2020 | Function | Queue | ||
| Nov 2020 | Priority | P1 | P1 | P1 |
| Nov 2020 | Team | Qeue-Member | Insurance | Pension |
| Nov 2020 | Team Target Coverage | 1 | 0.9 | 0.9 |
Solution
| Month | Function | Priority | Team | Team Target Coverage |
| Sep-20 | Queue | P1 | Member | 1 |
| Sep-20 | Queue | P1 | Insurance | 0.9 |
| Sep-20 | Queue | P1 | Pension | 0.9 |
| Oct-20 | Queue | P1 | Member | 1 |
| Oct-20 | P1 | Insurance | 0.9 | |
| Oct-20 | P1 | Pension | 0.9 | |
| Nov-20 | Queue | P1 | Qeue-Member | 1 |
| Nov-20 | P1 | Insurance | 0.9 | |
| Nov-20 | P1 | Pension | 0.9 |
Solved! Go to Solution.
Hello @Anonymous
you can use a Table.Group where you apply a Table.Transpose, Table.Ski and a Table.PromoteHeaders.
Here the code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jY6xCsIwEIZfJWSuErs5C4KD2mK30iGGo2RoItek0Lc3Jx1ilDZD7v7h+y9f2/IHvFgpSsELfvZGOW1NiLUHDz+7K774CrVF7WaKh2gkWANyCOsKwxMwhIsZPUqj6G4FZqQf/1RYI7EHx052ApQ90XRf7I/LpA67K7eizz4vBde8Yy5XPO3kmd/slGcegavmEbeY1+HWbls/KW7rd28=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column6 = _t, Column7 = _t, Column8 = _t, Column9 = _t]),
#"Grouped Rows" = Table.Group(Source, {"Column1"}, {{"AllRows", each Table.PromoteHeaders(Table.Skip(Table.Transpose(_), 1))}}),
#"Expanded AllRows" = Table.ExpandTableColumn(#"Grouped Rows", "AllRows", {"Function", "Priority", "Team", "Team Target Coverage"}, {"Function", "Priority", "Team", "Team Target Coverage"})
in
#"Expanded AllRows"
Copy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Hello @Anonymous
you can use a Table.Group where you apply a Table.Transpose, Table.Ski and a Table.PromoteHeaders.
Here the code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("jY6xCsIwEIZfJWSuErs5C4KD2mK30iGGo2RoItek0Lc3Jx1ilDZD7v7h+y9f2/IHvFgpSsELfvZGOW1NiLUHDz+7K774CrVF7WaKh2gkWANyCOsKwxMwhIsZPUqj6G4FZqQf/1RYI7EHx052ApQ90XRf7I/LpA67K7eizz4vBde8Yy5XPO3kmd/slGcegavmEbeY1+HWbls/KW7rd28=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column6 = _t, Column7 = _t, Column8 = _t, Column9 = _t]),
#"Grouped Rows" = Table.Group(Source, {"Column1"}, {{"AllRows", each Table.PromoteHeaders(Table.Skip(Table.Transpose(_), 1))}}),
#"Expanded AllRows" = Table.ExpandTableColumn(#"Grouped Rows", "AllRows", {"Function", "Priority", "Team", "Team Target Coverage"}, {"Function", "Priority", "Team", "Team Target Coverage"})
in
#"Expanded AllRows"
Copy paste this code to the advanced editor in a new blank query to see how the solution works.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!