Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
What is Tableau?
3.
Various Data Types In Tableau
3.1.
String Data Type In Tableau
3.1.1.
Char string type
3.1.2.
Varchar string type
3.2.
Date and Time Data Type In Tableau
3.3.
Numerical Data Type In Tableau
3.4.
Boolean Data Type In Tableau
3.5.
Geographic Values In Tableau
3.6.
Cluster Group/Mixed Values In Tableau
4.
How to change Data Types in Tableau?
4.1.
Modifying the data type of the field in the Data Source page
4.2.
Modifying the data type of the field from Data Pane
4.3.
Modifying the data type of the field from View
5.
Frequently Asked Questions
5.1.
How many data types can one work with in Tableau?
5.2.
Why should one choose Tableau?
5.3.
Who can use Tableau software?
5.4.
What different sources can be used to import data in Tableau?
5.5.
What are the different types of visualizations that can be made using Tableau?
6.
Conclusion
Last Updated: Mar 27, 2024

Data Types in Tableau

Create a resume that lands you SDE interviews at MAANG
Speaker
Anubhav Sinha
SDE-2 @
12 Jun, 2024 @ 01:30 PM

Introduction

This article aims to provide a comprehensive overview of data types in Tableau. The article begins by introducing the fundamental data types supported by Tableau, such as string, numeric, date and time, Boolean, geographical data, and cluster groups. It explores each data type's characteristics. Then we will understand how we can change the data type of fields.

Data Types in Tableau

Let’s begin the article by learning what is tableau.

What is Tableau?

Tableau is the most famous and powerful data visualization and business intelligence tool. It enables users to create interactive dashboards, reports, and charts to analyze and present data visually. With a user-friendly interface and drag-and-drop functionality, Tableau simplifies data exploration and enables deeper insights. 

It supports various data sources and offers advanced features like data blending, calculations, and forecasting. Tableau's intuitive visualizations aid businesses in uncovering patterns, trends, and correlations, empowering organizations to make data-driven decisions. Whether used by analysts, business users, or data scientists, Tableau helps unlock the full potential of data. It enhances understanding, communication, and collaboration across teams.

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Various Data Types In Tableau

A data type basically classifies the given data into different categories.

For example, a Student Database may contain the student’s name, “Ansh Verma”, his age “17”, his date of birth “02/04/2006”, and his Roll No. “31”, etc. The name of the student here is a String data type, age and roll number is a numerical data type, and date of birth is a date data type.

Different Data Types in Tableau

There are seven different data types in Tableau:

  1. String Values
  2. Date Values
  3. Date and Time Values
  4. Numerical Values
  5. Boolean Values
  6. Geographic Values
  7. Cluster Group
     

Now, let’s study them one by one.

String Data Type In Tableau

The string data type consists of zero or more characters, meaning it is a text data type. A value is a string when the characters are enclosed in a single or double quote. For instance, a string value can be "Orange" or "This is an Orange," etc.

The string data type has two types:-

Char string type

Char string data type generally stores alphanumeric values. The length of this string is fixed or predefined. It will show an error if a value other than the predefined length is entered.

Example: “four”

Varchar string type

Varchar stands for variable character. It also stores alphanumeric values. It holds values having a variable length. Hence, the user can enter as many string values as they want without facing any restrictions.

Example: “Hii, How are you?”

Date and Time Data Type In Tableau

Tableau can work with different date and time formats like dd-mm-yy, mm-dd-yyyy, etc. The time data values are a decade, year, quarter, month, hour, minute, second, etc. As the user enters data and time values, Tableau automatically classifies it under Date data type and Date & Time data value.

Example: 23-10-1999, 10-25-2002.

Numerical Data Type In Tableau

Numeric values can be of two types,

  1. Integer: These are whole values without any fractions. For example, 10, -4, 0, etc.
     
  2. Floating Point: These values contain a fraction. For example, 2.56, 5.00, 6.65, etc.
     

Floating Point values can store numbers only up to a specific limit. Tableau also provides a Round() function, which is used to round up the float values.

Boolean Data Type In Tableau

In Tableau, the Boolean data type represents a value that can be either true or false. Boolean values are formed as a result of relational calculations. Boolean values can also be expressed using 1 or 0. A relational calculation can also result in an unknown outcome; NULL values represent it.

Example: "age > 21", the result can either be "True" or "False."

Geographic Values In Tableau

Geographic data values are used in maps. These data types are denoted by a globe icon. It includes country name, state name, city, region, postal codes, etc. It associates each value in a field with latitude and longitude values.

With the geographic data type in Tableau, you can plot data points on maps, create heat maps, perform spatial analysis, and conduct geospatial visualizations.

Example: 19.0760° N, and 72.8777° E, Mumbai, 400001.

Cluster Group/Mixed Values In Tableau

The field may often not have a single data type; instead, it might include a mixed one. Thus, these values are named cluster groups or mixed data values. These values can create difficulties while analyzing the data. However, Tableau has the capability of handling such data. Users can also manually handle them by creating a separate column that doesn't contain mixed values.

Thus, this is all about the different Tableau data types; we will also know about the changing data type.

How to change Data Types in Tableau?

Tableau automatically assigns the data type to the existing fields within the recently uploaded data types. However, Tableau allows users to change the data types according to their needs.

There are three ways to change the data types in Tableau.

  1. Data Source Page
  2. Data Pane
  3. View

Modifying the data type of the field in the Data Source page

To modify the data type of a field from the data source, the user needs to:

  1. Click on the particular field's data type icon.
     
  2. A dropdown list will appear, user can choose and change from the given list of data types.
Modifying Data Type from Data Source Page

Modifying the data type of the field from Data Pane

After you upload the data within the Tableau data field, those data fields appear in the Data pane of a Tableau worksheet. If the user doesn't want to disturb the data source, then he/she can use this option. To modify the data type using the data pane user needs to:

  1. Click on the particular field's data type icon.
     
  2. A dropdown list will appear, user can choose and change from the given list of data types.
Modifying data type from Data Pane

Modifying the data type of the field from View

Another way is to change a field's data type in a view. To modify the data type using view user need to: 

  1. Right-click on the particular field.
     
  2. Choose Change Data Type
     
  3. Choose the data type of their choice.
Modifying data type from View

Frequently Asked Questions

How many data types can one work with in Tableau?

Tableau can work with seven different data types. These are String Values, Date Values, Date and Time Values, Numerical Values, Boolean Values, Geographic Values, and Cluster Groups.

Why should one choose Tableau?

Different traditional BI tools have hardware limitations. Tableau does not have any dependencies. Tableau is user-friendly and straightforward to understand. Users can work with multiple data sources.

Who can use Tableau software?

Tableau software is designed for use by a wide range of individuals and professionals across different industries, such as data analysts, data scientists, researchers, educators, executives, and managers.

What different sources can be used to import data in Tableau?

Excel, CSV, Databases, Web Data Connectors, Cloud Storage, Salesforce, and many more different sources can be used to import data into Tableau.

What are the different types of visualizations that can be made using Tableau?

Bar Charts, Line charts, pie charts, scatter plots, area charts, heat maps, tree maps, geographic maps, Gantt charts, and Box plots are some of the visualizations that can be created using Tableau.

Conclusion

In this blog, we discussed Data Types in Tableau and how we can change data types of fields in Tableau.

Recommended Articles:

And many more on our platform Coding Ninjas Studio.

Refer to our Guided Path to upskill yourself in DSACompetitive ProgrammingJavaScriptSystem Design, and many more! If you want to test your coding ability, you may check out the mock test series and participate in the contests hosted on Coding Ninjas Studio!

But suppose you have just started your learning process and are looking for questions from tech giants like Amazon, Microsoft, Uber, etc. Take a look at the problemsinterview experiences, and interview bundles for placement preparations.

However, you may consider our paid courses to give your career an edge over others!

Happy Learning!

Previous article
Making Bullet Chart in Tableau
Next article
Parameters in Tableau
Live masterclass