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
parry2k
1 year agoSuper User
sanpanico sorry not sure what you are trying to ? Are you trying to join columns of a table, or rows?
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_Mathur1 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.