user15170185
user15170185

Reputation: 11

in PowerBI - How to group a table by a column, and return all unique values (coma seperated) from another column as grouped

I am trying to group a table by a column, so the resulted table have unique values in that column, and also returns all the unique values from another column that belonged to the grouped column:

Source:

Country = USA

Cities = New York Boston Chicago Houston

Transform: group by [Country] column, and return unqiue values from [Cities] and coma seperated:

Country = USA Cities = New York,Boston,Chicago,Houston

thanks a lot

Upvotes: 0

Views: 84

Answers (1)

smpa01
smpa01

Reputation: 4282

You can simply use CONCATENATEX in a measure

s1

Measure = CONCATENATEX(VALUES('Table'[Cities]),'Table'[Cities],",")

Upvotes: 2

Related Questions