Tableau SQL Text Functions
Text Functions within Tableau.
A. CONCAT:
Full Name = [First Name] + ' ' + [Last Name]
This example concatenates the First Name and Last Name columns in the Customer table, resulting in a single string representing the customer's full name.
B. LEFT:
First Initial = LEFT([Name], 1)
This example returns the first character from the Name column in the Employee table, providing the employee's first initial.
C. RIGHT:
Last Two Digits = RIGHT([Invoice Number], 2)
This example returns the last two characters from the Invoice Number column in the Sales table, extracting the last two digits.
D. MID:
Order Code = MID([Order Number], 3, 4)
This example returns a substring of four characters starting from the third character of the Order Number column in the Orders table.
E. UPPER:
Capitalized Country = UPPER([Country])
This example converts the Country column in the Location table to uppercase, providing the country name in capital letters.
F. LOWER:
Lowercase Text = LOWER([Description])
This example converts the Description column in the Notes table to lowercase, providing the text in lowercase letters.
216