COMBINEVALUES
Texts joined with a delimiter (a constant text that isn't empty).
Group: Text. Compatible with DAX.
Syntax
COMBINEVALUES ( <delimiter>, <expression1>, <expression2> [, <expression3>] … )
| Parameter | Type | Description |
|---|---|---|
delimiter | Text | What is put between two values: a text that is not empty. |
expression1 | Value | The first value; a number or a date becomes text first. |
expression2 | Value repeatable | The second value, and as many more as are needed. |
Returns
Text. The values one after another, the delimiter between each two.
Remarks
- A blank value adds nothing, but the delimiters around it stay:
COMBINEVALUES ( "|", "a", BLANK (), "c" )is a||c. The result is never BLANK, even when every value is blank. - An empty delimiter is an error.
- Pick a delimiter that cannot occur in the values. Otherwise two different combinations can end up as the same text: a|b with c, and a with b|c.
- Power BI uses it to build keys of several columns, for relationships over DirectQuery. In OpenBI it gives what joining the values with
&and the delimiter gives.
Examples
A key of three parts
EVALUATE
ROW ( "Key", COMBINEVALUES ( "|", "Oslo", 2026, "Pils" ) )
| Key |
|---|
| Oslo|2026|Pils |
A blank part
The middle value is blank: its place stays empty between two delimiters.
EVALUATE
ROW ( "Key", COMBINEVALUES ( "|", "a", BLANK (), "c" ) )
| Key |
|---|
| a||c |
A label for each company
EVALUATE
SELECTCOLUMNS (
Companies,
"Key", Companies[Key],
"Label", COMBINEVALUES ( " - ", Companies[Key], Companies[Company] )
)
ORDER BY [Key]
| Key | Label |
|---|---|
| 1 | 1 - Example Brewery Group |
| 10 | 10 - Brewing |
| 11 | 11 - Bergen plant |
| 12 | 12 - Oslo plant |
| 13 | 13 - Trondheim plant |
| 20 | 20 - Distribution |
| 21 | 21 - Alnabru depot |
| 30 | 30 - Example Brewery Holding |