The string functions
The string fields are often the richest in data source as they include other fields with free text, but they can also have the lowest data quality. The string functions in Tableau Public empower you to perform splice
, trim
, find
, replace
, match
, reformat
, and concatenate
functions.
We will use several of these functions to clean up the floods data source, which was assembled manually and has several data quality issues.
The following are some of the most useful functions that we will use:
CONTAINS: This has a Boolean output. It tests whether a field contains the specified string.
FIND: This finds the place where a string of characters is located within a field.
LEFT, MID, and RIGHT: These often work in conjunction with FIND and LEN when extracting fixed or variable strings of characters from a field.
LEN: This produces the length of a field.
MIN and MAX: These are commonly used on numeric fields. They produce the numerically minimum or maximum values in sequences respectively...