The correct function is CONTAINS, making D correct. Its syntax is conceptually CONTAINS(string, substring), and it returns a Boolean result indicating whether the specified substring exists anywhere within the source string. For example, CONTAINS([Product Name] , "Office") evaluates to TRUE for records where Product Name contains the sequence "Office" and FALSE where it does not. This makes CONTAINS useful for classification calculations, conditional logic, filtering, validation, and text-based segmentation. The other functions perform different operations. RTRIM removes trailing spaces and returns a string. SPLIT separates a string using a delimiter and returns the requested substring component. ENDSWITH does return a Boolean value, but it tests specifically whether the original string ends with the supplied substring. The requirement is to determine whether a substring occurs somewhere within the column value, so ENDSWITH is too restrictive. Tableau's official String Functions reference explicitly defines CONTAINS(string, substring) as returning TRUE when the supplied string contains the specified substring and identifies its output data type as Boolean. The same documentation distinguishes CONTAINS from STARTSWITH, ENDSWITH, trimming functions, and string parsing functions. Relevant topics include calculated fields, string functions, Boolean calculations, and text manipulation.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit