KNOWLEDGE BASE

"Unterminated String" Error in Calculation Editor


Published: 10 Jul 2023
Last Modified Date: 11 Jul 2023

Issue

"Unterminated string" error occurs in a calculation editor.

e.g.
User-added image
User-added image

Environment

  • Tableau Desktop
  • More likely in Japanese, Chinese, Korean, double byte environment 

Resolution

Make sure that the quotation marks before and after the string value are the same half size (one-byte) quote character.

Cause

This is a syntax error. Different type of quotation marks are used to indicate a string value.

Additional Information

If the begninning quote character is double byte character, you receive "Bad character" error message. 
If the closing quote character is double byte, you will receive "Unterminated string" error message. Either way, make sure the single byte quote characters are used in all places in the calculation. 
Did this article resolve the issue?