Forum Discussion
sanpanico
1 year agoFrequent Visitor
Syntax to join values from multiple table cells into one Table cell
Good day! I am attempting to join values from multiple table cells into one Table cell. Simple right?! Using =Join(Fields!XXX.Value, ", ") causes "#Error" to show up in the table cell, I assume be...
- 1 year ago
sanpanico
1 year agoFrequent Visitor
parry2k, thank you, and apologies.
I am attempting to join rows of separate cells within the same table column.
Here is an example of the before and after;
Person | StrID -------------- Jim | a Jim | b Jim | c Jim | d Mary | h
Mary | k
Sue | l
Sue | m
Sue | p
Sue | z
Person | StrID's ------------------- Jim | a, b, c, d Mary | h, k Sue | l, m, p, z
There are many examples of how to implement this using SQL, but again, I am NOT able to implement custom SQL, and as such am relying on the Report Builder's expression builder.
Many thanks!
~San
Ashish_Mathur
1 year agoSuper User
Hi,
This M code in Power Query works
let
Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"Person"}, {{"Count", each Text.Combine(_[StrID],", ")}})
in
#"Grouped Rows"
Hope this helps.