Chapter 9. Dealing with String Data

When I think about preparing data, I instantly think about battling fields that contain string data. Customer names, product descriptions, messages, and geographic names are all strings that you will likely need to manipulate when you prepare your data for analysis. This chapter will cover what a string is and how it differs from numbers. Having that background will allow you to further explore working with string data fields through both calculations and Prep Builder’s built-in functionality.

What Do We Mean by Strings?

When most people think of data, they think about the measures we are summing, averaging, or finding the minimum and maximum of. But those measures don’t tell us much until we start analyzing things at different levels—for example, average sales by region or total sales per company.

Strings are often those dimensions by which we categorize data in tools like Tableau Desktop. Tableau indicates strings with the Abc icon (Figure 9-1).

String fields in Tableau are indicated by the Abc icon
Figure 9-1. String fields in Tableau are indicated by the Abc icon

String data fields are the most flexible in terms of the values they can hold. Typically, they can contain everything from A through Z and 0 through 9 as well as punctuation and most other characters. With that flexibility, though, also comes pain, as the variety of values can create headaches for you as you prepare your data.

Get Tableau Prep: Up & Running now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.