Fustavo Gringe
Fustavo Gringe

Reputation: 37

Concatenate column values to single row in visualization

I have this table in Power BI, where the visible rows all have the same tracking number, but there are multiple rows due to the sku column.

enter image description here

How can I achieve a result like this where this is shown in just one row, and all skus are listed comma separated:

enter image description here

I have achieved this using pandas, but want to do the same in Power BI. However, I have not been able to find a solution to this issue.

Upvotes: 0

Views: 1157

Answers (1)

Marcus
Marcus

Reputation: 3995

You need to use CONCATENATEX evaluating the list of SKU for that row in your visualization. You measure will need to look something like this:

skus =
CONCATENATEX (
    VALUES ( 'Table'[sku] ), 
    [sku],
    ","
)

Upvotes: 4

Related Questions