Dax Function: CONCATENATE

Category: Text Functions

The CONCATENATE function in Power BI is a DAX function used to join two text strings into a single string. It is primarily used to create new text values from existing data by combining two strings without any delimiter.

Purpose

To merge two text strings into one, enabling you to format and organize text data effectively.

Calculations Performed

This function performs basic text concatenation, which involves appending one string to another without any separator.

Practical Use Cases

  • Combining first and last names into a full name.
  • Creating single-line text summaries by joining strings from different columns.
  • Constructing custom labels or tags for visualization purposes.

CONCATENATE(string1, string2)

ParameterTypeDescription
string1ScalarThe first text string or column to be combined.
string2ScalarThe second text string or column to be combined.

How Does CONCATENATE Dax Function Works

The CONCATENATE function joins two text values by directly appending the second string to the first, without any space or delimiter. Both input values must be of text data type. If numeric values are used, they will automatically be converted to text before concatenation.

Formula Logic Example:

CONCATENATE("Hello", "World")

Result: "HelloWorld"

What Does It Return?

The function returns a single text string created by appending the second string to the first.

When Should We Use It?

  • To quickly merge two text columns or values into a single string.
  • When no delimiter is required between concatenated text values.
  • To simplify column expressions that need basic string merging.

Examples

Basic Usage

Combine two static text values.


CONCATENATE("Power", "BI")

Result: "PowerBI"

Column Usage:

Combine the values of two columns into one.


CONCATENATE('Table'[FirstName], 'Table'[LastName])

Result (Row Example): "JohnDoe"

Advanced Usage

Combine strings and numbers for formatted text output.


CONCATENATE("Total Sales: ", SUM('Sales'[Amount]))

Result: "Total Sales: 5000" (assuming SUM('Sales'[Amount]) equals 5000).

Tips and Tricks

  • Use CONCATENATEX for Multiple Columns: CONCATENATE works for only two strings. Use CONCATENATEX to combine multiple strings or entire columns with a delimiter.
  • Format Numeric Values: Use the FORMAT function to control how numeric values appear in the concatenated string.
  • Avoid Excessive Use in Measures: For better performance, use calculated columns when static concatenation is required.

Performance Impact of CONCATENATE DAX Function:

  • Efficient for simple concatenation of two text strings.
  • For dynamic concatenation of many values or large datasets, consider using CONCATENATEX or calculated columns for optimal performance.

Related Functions You Might Need

  • COMBINEVALUES: Concatenates multiple strings with a specified delimiter.
  • CONCATENATEX: Concatenates column values across rows with a delimiter.
  • TEXT: Converts numbers to formatted text.

Want to Learn More?
For more information, check out the official Microsoft documentation for CONCATENATE You can also experiment with this function in your Power BI reports to explore its capabilities.

Unlock the full capabilities of Power BI and elevate your data insights with our specialized consulting services. Whether you need guidance on advanced DAX functions like those highlighted here, support in designing interactive dashboards, or expertise in optimizing data models for enhanced performance, our experienced Power BI consultants are equipped to deliver customized solutions for your business. Explore our Power BI Consulting Services page to discover how we can help your organization make smarter, data-driven decisions.

1. What is the purpose of the CONCATENATE function in Power BI?

To combine two text strings into a single string without a delimiter.

2. Can CONCATENATE handle numeric values?

Yes, numeric values are automatically converted to text before concatenation.

3. What is the difference between CONCATENATE and CONCATENATEX?

CONCATENATE works on two strings, while CONCATENATEX allows concatenation across multiple rows or columns with a delimiter.

4. How do I add a space between concatenated values?

Include the space explicitly in one of the strings, e.g., CONCATENATE('Table'[FirstName], " " & 'Table'[LastName]).

5. Is there a limit to the length of concatenated strings?

The output is limited by Power BI’s maximum string length of 268,435,456 characters.