It’s not much different than analysing a text string in SQL 😉
Tableau uses more or less the same standard text functions that you will find in SQL.
Let’s use a sample dataset of TEDx videos – ted_main
Assuming I want to check if there is any correlation between the number of views a video gets and the number of words in its title
The first thing I would want to do is create the following calculated field in Tableau
Remember the technique?
- It counts the total length of your string
- It subtracts the number of characters once spaces have been removed (this gives you the number of spaces in a string)
- Adds 1 (as you always have 1 word more than you have spaces)
Voila – you’ve got the number of words making up your string!
How do I check if my text strings has any punctuation peculiarities?
This is a bit more annoying as unlike SQL, Tableau calculated fields do not support the “in” operator, ultimately setting you up for a bit more typing.
Nevertheless, you can still get an adequate feeling for the type of punctuation that dominates your strings
Want to check out the actual workbook? – You can find it here