Reputation: 63
I am creating a report and have an issue to concatenate strings within a group. E.g. I have the following structure of a table
NameOfPerson | Country | State
I grouped the table by NameofPerson and the sub group Country.
-Name
--Country
Now, if I expand Country I get a list of all States but I would like to have on the sub group lvl of Country a concatination of States.
E.g.
-Name:Bill
--Country: America | State: Virgina, Texas, California
--Country: Canada| State: Alberta, Ontario
How can I do this?
Thanks and regards,
Upvotes: 1
Views: 1095
Reputation: 10880
You can use LookUpSet to look up the states and JOIN to combine them into a string.
=JOIN(LOOKUPSET(Fields!Country.Value, Fields!Country.Value, Fields!State.Value, "DataSet1"),", ")
Depending on your data this may have duplicates. You may want to create a separate dataset of the countries and states.
Upvotes: 1