KNOWLEDGE BASE

Combining Two String Fields


Published: 01 May 2013
Last Modified Date: 06 Dec 2017

Question

How to create a calculated field that combines two string variables.

Environment

Tableau Desktop

Answer

Use the plus sign (+) operator to combine two string fields:
  1. Go to Analysis > Create Calculated Field.
  2. Name the calculated field and enter the following formula: 
  3. [String1] + [String2] 
    
  4. Click OK.

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.
Did this article resolve the issue?