OpenBI Docs Buy

Text.Combine

Texts from a list joined into one, with a separator between them if you give one.

Group: Text and characters. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Text.Combine(texts as list, optional separator as nullable text) as text
ParameterTypeDescription
textslistThe texts to join, in order.
separatornullable text
optional
What goes between two texts. Left out, nothing.

Returns

text. One text; an empty text for an empty list.

Remarks

  • Nulls in the list are skipped, separator and all.
  • Every item must be a text or null: turn numbers and dates into text first with Text.From.

Examples

A list of cities

Text.Combine({"Oslo", "Bergen", "Trondheim"}, ", ")
"Oslo, Bergen, Trondheim"

A missing part

Text.Combine({"NO", null, "0150"}, "-")
"NO-0150"

The null leaves no empty slot between two dashes.

A code from a number

Text.Combine({"SKU", Text.From(123)}, "-")
"SKU-123"

Text.Split, Combiner.CombineTextByDelimiter, Text.From, Text.Format.

Last updated · OpenBI Studio 0.3.79