Text.Combine

Text

Joins a list of text values into a single text value with an optional separator.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Text.Combine(texts as list, optional separator as nullable text) as text

Parameters

NameTypeRequiredDescription
textslistYesA list of text values to combine.
separatortextNoA text value to insert between each item. If omitted, items are concatenated directly.

Return Value

textA single text value created by joining all items in the list.

Remarks

Text.Combine concatenates a list of text values into a single string. Pass a separator to insert a delimiter between each value — for example, a comma, space, or newline.

Null values in the list are skipped (not included in the output). If all values are null, the result is an empty string.

Examples

Example 1: Combine customer cities

let
    Cities = Table.Column(Customers, "City"),
    Combined = Text.Combine(Cities, ", ")
in
    #table({"CityList"}, {{Combined}})
Result
CityList
1New York, Chicago, Houston, Seattle

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks