Cheat Sheets/Power BI/CONCATENATEX
DAX function

CONCATENATEXDAX function reference

Join an expression across rows.

Syntax

dax
CONCATENATEX(<table>, <expression>, [<delimiter>], [<orderBy_expression>], [<order>])

Examples

dax
CONCATENATEX(VALUES(Product[Name]), Product[Name], ", ")
"A, B, C"

The 4th/5th arguments control sort order independently of the table's natural order, which CONCATENATEX otherwise doesn't guarantee.

dax
CONCATENATEX(VALUES(Product[Name]), Product[Name], ", ", Product[Name], ASC)
An alphabetically sorted product list
dax
"Selected: " & CONCATENATEX(FILTER(VALUES(Sales[Channel]), NOT(ISBLANK(Sales[Channel]))), Sales[Channel], " / ")
A slicer-summary string for a report title

Common mistakes & gotchas

Related DAX functions

From Iterators & variables

← Back to the Power BI (DAX) cheat sheet