Forum Discussion
Klaimand
7 years agoNew Member
How to Aggregate data
Hello, Im trying to aggregate data as follow: Current data format: ID Name 1 A 1 B 1 C 2 D 2 E 3 F Expected result: ID Name 1 A;B;C ...
- 7 years ago
Hi Klaimand,
Based on my test, you could refer to below formula:
Create a new table:
New Table = SUMMARIZE('Table1','Table1'[ID],"Name",CONCATENATEX('Table1','Table1'[Name],","))Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
- 7 years ago
Hi,
This M code works
let Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}}), Combine = Table.Group(#"Changed Type", {"ID"}, {{"All Names", each Text.Combine(List.Distinct([Name]), "; "), type text}}) in Combine
Ashish_Mathur
7 years agoSuper User
Hi,
This M code works
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}}),
Combine = Table.Group(#"Changed Type", {"ID"}, {{"All Names", each Text.Combine(List.Distinct([Name]), "; "), type text}})
in
Combine