From the course: Tableau 10 for Data Scientists
Unlock the full course today
Join today to access over 23,300 courses taught by industry experts.
Create an initial filter from a surname - Tableau Tutorial
From the course: Tableau 10 for Data Scientists
Create an initial filter from a surname
- [Narrator] A useful string calculation would be the ability to create a filter so we could look up somebody's surname by their first initial. In this example, we've got fifteen thousand records of runners who've competed in a race. The first step is to split the name into forename and surname then take the surname, split off the initial and then create a filter using that information. First, let's split the name. We just go to name, transform, and split. We've now got our two fields, one named forename and surname. That should place these on our field. There we go. Next thing we need to do is split off the first character of our surname to create our initial filter. So for that, we select the surname and do calculated field. The function we're gonna use is a string function which can be found here. We're gonna use the left function. This returns a specified number of characters from the start of a given string. So for our example, we're gonna say left, the string, and the number of…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.