Last Modified Date: 29 May 2023
Environment
Tableau DesktopAnswer
Use the plus sign (+) operator to combine two string fields:- Go to Analysis > Create Calculated Field.
- Name the calculated field and enter the following formula where Field1 and Field2 are string fields:
-
[Field1] + [Field2]
- Click OK.
- Drag the new calculated field to the Rows shelf to display the new string concatenation.
Additional Information
- Using a plus sign (+) combines two string fields together ("abc"+ "def" = "abcdef").
- If a space is needed between the two fields, modify the above formula "abc" + " " + "def" = "abc def"
- Any required punctuation (e.g. comma) may be added into the formula as needed.
- Concatenating with a NULL value results in NULL. "abc" + NULL = NULL.
If you receive the error "All fields must be aggregate or constant when using table calculation functions or fields from multiple data sources." Refer to the articles below:
Unable to Use a Table Calculation such as RANK() on An LOD (Level of Detail) Calculation
Aggregate Error Messages In a Calculation Editor
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Continue Searching
Knowledge Base
Community
Product Help
Training and Tutorials