Dax powerbi legend creating a new column from two columns

In Power BI, you can create a new column in the DAX formula language by combining values from two existing columns. Here are a few ways to do it:

Method 1: Using the & operator

You can use the & operator to concatenate the values from two columns. For example:

New Column = 'Table Name'[Column1] & 'Table Name'[Column2]

This will create a new column that combines the values from Column1 and Column2 into a single string.

Method 2: Using the CONCATENATE function

You can use the CONCATENATE function to concatenate the values from two columns. For example:

New Column = CONCATENATE('Table Name'[Column1], 'Table Name'[Column2])

This will also create a new column that combines the values from Column1 and Column2 into a single string.

Method 3: Using the COMBINE function

You can use the COMBINE function to combine the values from two columns. For example:

New Column = COMBINE('Table Name'[Column1], 'Table Name'[Column2], ", ")

This will create a new column that combines the values from Column1 and Column2 into a single string, separated by a comma and a space.

Method 4: Using a calculated column

You can also create a calculated column using the CALCULATE function. For example:

New Column = CALCULATE(
    'Table Name'[Column1] + 'Table Name'[Column2]
)

This will create a new column that combines the values from Column1 and Column2 into a single value.

Note that in all of these examples, you need to replace 'Table Name' with the actual name of your table, and Column1 and Column2 with the actual names of the columns you want to combine.