Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
i've been looking for solution for some days and not yet succeeded. Task is simple, or atleast it should be:
This is what i have:
place_ID | tag |
1 | X |
1 | Y |
2 | X |
2 | Y |
… | … |
1900 | X |
1900 | Y |
This is what i want:
place_ID | tag X | Tag Y |
1 | X | Y |
2 | X | Y |
… | … | … |
1900 | X | Y |
I need this to be done at Query editor. Thanks!
Solved! Go to Solution.
Give this a try
File attached as well
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Source,{{"place_ID", Int64.Type}, {"tag", type text}}), #"Grouped Rows" = Table.Group(#"Changed Type", {"place_ID"}, {{"AllRows", each _, type table}}), #"Added Custom1" = Table.AddColumn(#"Grouped Rows", "Custom.1", each Table.Transpose(Table.SelectColumns([AllRows],"tag"))), #"Expanded Custom.1" = Table.ExpandTableColumn(#"Added Custom1", "Custom.1", {"Column1", "Column2"}, {"Column1", "Column2"}), #"Removed Columns" = Table.RemoveColumns(#"Expanded Custom.1",{"AllRows"}) in #"Removed Columns"
Give this a try
File attached as well
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Source,{{"place_ID", Int64.Type}, {"tag", type text}}), #"Grouped Rows" = Table.Group(#"Changed Type", {"place_ID"}, {{"AllRows", each _, type table}}), #"Added Custom1" = Table.AddColumn(#"Grouped Rows", "Custom.1", each Table.Transpose(Table.SelectColumns([AllRows],"tag"))), #"Expanded Custom.1" = Table.ExpandTableColumn(#"Added Custom1", "Custom.1", {"Column1", "Column2"}, {"Column1", "Column2"}), #"Removed Columns" = Table.RemoveColumns(#"Expanded Custom.1",{"AllRows"}) in #"Removed Columns"
Works like a charm! 5/5
User | Count |
---|---|
90 | |
74 | |
67 | |
63 | |
55 |
User | Count |
---|---|
99 | |
88 | |
72 | |
60 | |
59 |