DAX CONCATENATEX function

Joins the results of an expression for each row into one text, with a separator.

CONCATENATEX turns a list into a sentence: the products sold, the countries selected. It is handy in tooltips and titles.

Syntax

CONCATENATEX(<table>, <expression>[, <delimiter>[, <orderBy_expression>[, <order>]]])
ArgumentRequiredDescription
tableRequiredThe rows to go through, often VALUES(column).
expressionRequiredThe text for each row.
delimiterOptionalThe separator, like ", ".
orderBy_expressionOptionalWhat to sort the items by.
orderOptionalASC or DESC.

Returns: A text.

Examples

Calculated on the free practice data (table financials), with [Total Sales] = SUM(financials[Sales]) and [Total Profit] = SUM(financials[Profit]).

1. The products in view

Product List = CONCATENATEX(VALUES(financials[Product]), financials[Product], ", ", financials[Product], ASC)

Result: Amarilla, Carretera, Montana, Paseo, Velo, VTT

All six products, sorted A to Z.

Good to know

  • Long lists make unreadable visuals. Combine with TOPN to show the top few only.

Related functions

Official reference: CONCATENATEX function on Microsoft Learn