OpenBI Docs Buy

COMBINEVALUES

Texts joined with a delimiter (a constant text that isn't empty).

Group: Text. Compatible with DAX.

Syntax

COMBINEVALUES ( <delimiter>, <expression1>, <expression2> [, <expression3>] … )
ParameterTypeDescription
delimiterTextWhat is put between two values: a text that is not empty.
expression1ValueThe first value; a number or a date becomes text first.
expression2Value
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]
KeyLabel
11 - Example Brewery Group
1010 - Brewing
1111 - Bergen plant
1212 - Oslo plant
1313 - Trondheim plant
2020 - Distribution
2121 - Alnabru depot
3030 - Example Brewery Holding

CONCATENATE, CONCATENATEX, FORMAT.

Last updated · OpenBI Studio 0.3.74