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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
This is my first post, please bare with me, and I am new in this forum, need help
I have a source data like as below
And the end goal will be like this,
Presently I am using the power query with this code
let
Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"Name"}, {{"All", each _, type table [Name=text, Address=text, City=text, State=text]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.Column([All],"Address")),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Custom.1", each Table.Column([All],"City")),
#"Added Custom2" = Table.AddColumn(#"Added Custom1", "Custom.2", each Table.Column([All],"State")),
#"Extracted Values" = Table.TransformColumns(#"Added Custom2", {"Custom", each Text.Combine(List.Transform(_, Text.From), "|"), type text}),
#"Extracted Values1" = Table.TransformColumns(#"Extracted Values", {"Custom.1", each Text.Combine(List.Transform(_, Text.From), "|"), type text}),
#"Extracted Values2" = Table.TransformColumns(#"Extracted Values1", {"Custom.2", each Text.Combine(List.Transform(_, Text.From), "|"), type text}),
#"Removed Columns" = Table.RemoveColumns(#"Extracted Values2",{"All"})
in
#"Removed Columns"
In real there are around 30 columns, how can avoid using Table.Column or if I am using Table.Column then how to combine all the columns dynamcially to achieve the above end goal.
Solved! Go to Solution.
let
Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"Name"}, List.Trandform(List.Skip(Table.ColumnNames(Source)),(x)=>{x,each Text.Combine(List.Transform(Table.Column(_,x),Text.From),"|")}))
in
#"Grouped Rows"
let
Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"Name"}, List.Trandform(List.Skip(Table.ColumnNames(Source)),(x)=>{x,each Text.Combine(List.Transform(Table.Column(_,x),Text.From),"|")}))
in
#"Grouped Rows"
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 16 | |
| 12 | |
| 9 | |
| 7 | |
| 6 |