Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sanpanico
Frequent 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 because Fields!XXX.Value is not actually a multi-value field, it's a single value per the main identifier. 
sanpanico_0-1739313941050.png

 

I have gotten it to work in a separate text field, however the Table field behaves differently.  I've attempted to implement Report Builder's functions like Aggregate, Lookup with no success.   Also, I am NOT able to implement custom SQL, and as such am relying on the native expression builder.
Any and all suggestions welcome!
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@sanpanico RDL file is attached. I created the sample from your data, and here is the output:

 

parry2k_0-1739586446410.png

 

 

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@sanpanico RDL file is attached. I created the sample from your data, and here is the output:

 

parry2k_0-1739586446410.png

 

 

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k, many thanks!
As mentioned, I also tried Lookup with minor success.  My issue remains that for each occurence of a name (it's actually an ID field), the joins are returned in each cell for as many rows as an ID occurs.  I am going to test the creation of a separate Data Set, and remove the IDs from my main query/Data Set.
I will update this post if it works, but I have accepted your solution as well
Thanks again!
~San

parry2k
Super User
Super User

@sanpanico sorry not sure what you are trying to ? Are you trying to join columns of a table, or rows?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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

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.

Ashish_Mathur_0-1739597653647.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.