Power BI: How to Concatenate More Than 2 Columns


The easiest way to concatenate more than 2 columns together in Power BI is to use the & symbol in DAX.

For example, you can use the following syntax to concatenate three columns together:

Full Name = 'my_data'[First] & " " & 'my_data'[Middle] & " " & 'my_data'[Last]

This particular example creates a new column named Full Name that concatenates the strings from the First, Middle and Last columns, using spaces as the separator between the strings.

The following example shows how to use this syntax in practice.

Example: How to Concatenate More Than 2 Columns in Power BI

Suppose we have the following table named my_data in Power BI:

Suppose that we would like to create a new column that concatenates the strings from the First, Middle and Last columns.

To do so, click the Table tools tab and then click the New column icon:

Then type the following formula into the formula bar:

Full Name = 'my_data'[First] & " " & 'my_data'[Middle] & " " & 'my_data'[Last] 

This will create a new column named Full Name that concatenates the strings from the First, Middle and Last columns, using spaces as the separator between the strings:

Power BI concatenate more than 2 columns

Note that we chose to use a space as a separator, but you could use any separator you’d like by specifying it after the & symbols.

For example, you could use the following syntax to use a comma as a separator:

Full Name = 'my_data'[First] & "," & 'my_data'[Middle] & "," & 'my_data'[Last] 

This will concatenate the values from the three columns with a comma in between each string:

Note: In this example we concatenated three columns together but you can use the & symbol as many times as you’d like to concatenate even more columns together.

Additional Resources

The following tutorials explain how to perform other common tasks in Power BI:

How to Use Formula for “If Contains” in Power BI
Power BI: How to Remove Characters from String
Power BI: How to Extract Substring

Leave a Reply

Your email address will not be published. Required fields are marked *