Hi there! Welcome to my second learning/teaching blog. The New York weather has been on and off lately with wild fluctuations in the weather and temperature, so let’s all channel our inner capybara and try to relax as you read this blog about data types.
Since you’re here reading this blog, you’ve probably seen Tableau or heard of Tableau and you’re here trying to better understand the different data types you can find on Tableau. If that was your intention, yay! You’ve come to the right place! If you didn’t, well, it doesn't hurt to get a little refresher.
Tableau has 7 different data types:
Source: Tableau
When you connect to a data source, Tableau interprets the data type of each field.
Let’s take a look at each type:
String
The String Data type is also known as the text data type. The string data type can include zero or more characters between single or double quotes.
For example:
- “The application for The Data School’s next cohort is currently live.” and ‘The application for The Data School’s next cohort is currently live’ both count as strings.
A string can also include symbols or numeric values as well, if enclosed in quotation marks.
For example:
- “63560497_nayeli_jaime_(&@10” can be a string
- “93856457 connie koo !!!” can be a string as well
Date and Date&Time
This data type is used to store dates and times.
Some fields only include the date and can be stored as a date data type.Dates can be stored in all formats of date and time such as dd-mm-yy or mm-dd-yyyy.
Some fields can also include a timestamp and would be stored as a datetime data type. To provide a consistent and clear method to represent and calculate dates, many Tableau users may opt to use the ISO 8601 date format (yyyy-mm-dd hh:mm:ss.sssz).
Numerical
Numerical data types can consist of either integer or floating numerical values. Numerical values can be used in mathematical calculations in order to get greater insight into the data. When it comes to floats, oftentimes the round() function is used in order to round them up to corresponding integer values, to two decimal places, or the necessary decimal places.
Boolean
Boolean values, also known as logical values or true and false conditions, are a result of relational calculations. The values are usually either True or False.
Geographic
Geographic data contains values that can be used in a map. Values such as latitude, longitude, country, state, city, region, and zip code are examples of geographic data.
Geographic region data type is also a string.
Cluster Groups
Sometimes datasets contain a mixture of data types. The data can be handled either manually by separating the fields of different types or allowing Tableau to operate on it.
Hope this helps you better understand the different data types within Tableau!