DAX Text - CONCATENATEX function



Description

Concatenates the result of an expression evaluated for each row in a table.

DAX CONCATENATEX function is new in Excel 2016.

Syntax

CONCATENATEX (
   <table>, <expression>, [<delimiter>], [<OrderBy_Expression1>], [<Order>] …
) 

Parameters

Sr.No. Parameter & Description
1

table

The table containing the rows for which the expression will be evaluated.

2

expression

The expression to be evaluated for each row of the table.

3

delimiter

Optional.

A separator to use during concatenation.

4

OrderBy_Expression1

Optional.

Column by which the values are to be concatenated.

5

Order

Optional.

ASC: To sort in an ascending order.

DESC: To sort in a descending order.

If omitted, default is ASC.

Return Value

A single text string.

Remarks

CONCATENATEX function takes as its first parameter, a table or an expression that returns a table.

The second parameter is a column that contains the values you want to concatenate, or an expression that returns a value.

Example

CONCATENATEX (Products, [Product],", ", [Product Key], ASC)
   returns Air Purifier, Detergent Powder, Floor Cleaner, Hand Wash, Soap.
   
= CONCATENATEX (Products, [Product],",", [Product Key], DESC) 
   returns Soap, Hand Wash, Floor Cleaner, Detergent Powder, Air Purifier. 

= CONCATENATEX (Products, [Product],", ", [Product Key]) 
   returns Air Purifier, Detergent Powder, Floor Cleaner, Hand Wash, Soap.
dax_functions_text.htm
Advertisements