Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
2 D;E
3 F
Do you know how to build this step in my query?
Best regards,
Solved! Go to Solution.
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
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
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
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
User | Count |
---|---|
79 | |
74 | |
44 | |
32 | |
28 |
User | Count |
---|---|
104 | |
93 | |
52 | |
50 | |
46 |