<!-- https://learnsql.cpetoday.com/functions/dax/concatenate -->
# CONCATENATE

Language: DAX
Category: Text
Syntax: CONCATENATE(<text1>, <text2>)
Summary: Joins two text values into one text value.
Returns: Text (a scalar).
Level: Beginner
Related: CONCATENATEX, FORMAT, LEFT, RIGHT, SUBSTITUTE, UPPER

## What it does
CONCATENATE joins exactly two text values end to end. It is the older, two-argument form of the ampersand operator. Use it to build a label from two fields, such as an account number and an account name, or a vendor code and a vendor name. For more than two pieces, the & operator or CONCATENATEX is easier to read.

## Syntax and arguments
- text1: the first value, a column or text in quotes. Numbers are converted to text.
- text2: the second value. CONCATENATE takes no more than two.

## Example
The general ledger reports show account numbers and names together. The label should read "4000 Product Revenue".

```dax
Account Label =
CONCATENATE(
    GL[AccountNumber],
    CONCATENATE(" ", GL[AccountName])
)
```

An inner CONCATENATE adds the space before the name, and the outer one joins the number to that text. The result can be used as a row label on a chart, sorted by the account number column.

## Example: a second, different use
A vendor label for a payment run that shows the code and the name:

```dax
Vendor Label = CONCATENATE(Vendors[VendorCode], Vendors[VendorName])
```

Without a separator, the code and the name run together. Use the nested form above to add a space or a dash when the label must be readable.

## Things to watch
- Only two arguments are accepted. A third argument is an error. Nest CONCATENATE or use &.
- Blank values join as empty text, so a missing name produces a label with nothing after the code.
- The result is text. Do not use it in arithmetic, and do not sum it.
- Text joins do not sort the way numbers do. Sort the label by the number column when order matters.
- Concatenating columns in a calculated column increases the model's size. Build labels only where they are needed.

## In business terms
Labels such as account number plus name, invoice number plus customer, or employee code plus name make reports readable to people who are not familiar with the data. Auditors and controllers rely on these labels to match a line to its source document.
