KNOWLEDGE BASE

Adding A Line Break in A Calculated Field


Published: 19 Apr 2013
Last Modified Date: 15 Mar 2024

Question

How to add a line break in a calculated field. 

Environment

Tableau Desktop

Answer

CLICK TO EXPAND STEPS

Option 1 

Surround it by quotation marks:
[State] + " 
"+ [Region]
Note:
To add an empty line between the line break, add another carriage return:
[State] + " 
 
"+ [Region]
To view the steps showed in the below video, please expand the above section.
Note: the video has no sound.
 
 
CLICK TO EXPAND STEPS

Option 2

Use the following encoded value:
CHAR(10)

Additional Information

The newline character CHAR(10) is more reliable because it can insert a newline within the SQL query string. For example, if the string is used as a filter value.
Did this article resolve the issue?