top of page
Writer's pictureKasthuri Indiran

Tableau Data Types

 

Tableau is a Business Intelligence tool used in data visualization. Tableau helps us to analyze raw data in the form of visual manner. It can manage enormous amounts of data with ease, this means we can use Tableau to visualize data from multiple sources, including databases and web pages.


The data type classifies data values into characters, integers, floating type, etc., Each data value lies under certain datatypes. These data types reflect the kind of information stored in that field. Tableau simplifies data analysis by assigning data types, but it also provides flexibility to adjust these datatypes as based on the requirements.


Tableau automatically detects the type of various fields when the data loaded from the source.

There are seven different primary data types in Tableau.


  • String

  • Date

  • Date and Time

  • Numeric

  • Boolean

  • Geographic

  • Cluster or Mixed Values


The specific Icon for every data type given below:


Image By Author

 

String:


Any sequence of characters which are enclosed within single or double quotes. A string datatype stores textual information such as names, product descriptions, dimensions, and analysis etc., In Tableau, string data type allows various operations including concatenation, pattern matching, substring extraction, etc.,


e.g.,

‘Hello’

“Numpy Ninja”


A string datatype is further divided into two categories which are Char and Varchar. The value of ‘char’ datatype has fixed length. If we try to enter the string value with length greater than fixed length, then the system shows an error. ‘Varchar’ datatype stores data values with variable length. So, we can enter as many string values as we want without any restrictions.



Numeric:


Numeric data types such as Integers and floats are used for mathematical calculations and aggregations. Integer data types can be used for indexing and counting whereas float data types are used for financial data, scientific measurements and any data that necessarily needs decimal accuracy. We can use Round() function to round the float values.


e.g.,

Integer:  10

Float: 1.0      

 

Date & Time:


Date datatype enables the analysis of trends and patterns over a period of time. Time datatype enables the precise tracking of events. DateTime datatype combines both date and time information. Tableau supports different forms of date and time like dd-mm-yyyy, mm-dd-yyyy, etc., This is also can be used for sorting based on date, time, and duration. Time Data values can be "seconds", "minutes", "hours", "days", "weeks", "months", "years", "decades" and etc.,


e.g.,

01/01/2020

Jan-10-2020


If we want to add the data time value in the form of string , add prefix '#'.

e.g., # 7 May 2024 ( String )

Boolean:


Boolean datatype stores binary values (True or False) are used for conditional calculations, logical operations and creating filters. This datatype is particularly used for creating dynamic calculations based on specific criteria. True or False are also represented by binary value 1 or 0 respectively.


e.g.,

SUM(Sales)>=5000

 

Geographical:


All values that are used in maps such as country name, state, region, city, postal code, etc., come under geographical datatypes.


Geographic fields have globe icons, next to them in the Data pane. if we assign geographic role to a field , Tableau automatically creates a map view when you add the field to Detail on the Marks card.

 

Cluster or Mixed values:


Clustering in Tableau is used to identify groups of similar objects in a dataset with two or more quantities. Here the objective is to group the data into separate groups based on the given data. A cluster group is a set of similar data points. Tableau automatically identifies similar data points.


e.g., groups customers based on their locale.

automatically organize products based on some characteristics.

 

 Changing a data type :

 

How to change a data type?


In some cases, the data type of the data needs to be modified to produce an accurate data representation or better visualization. So, Tableau gives us an option to convert the data type from one to another.


In Tableau, the datatype for a field can be changed in different ways.


  • Change the datatype of a field in Data Source page:


To change the datatype of a field from the data source page, click on the datatype icon of that field, the drop down will appear from where we can change the datatype of that field.


 

  • Change the datatype of a field in Data pane:

 

Data fields are shown in the Data pane of Tableau worksheets. Click on the Datatype icon of a field from the Data pane, then select the new data type from the list that are given.


 

  • Change the datatype of a field in the view:

 

Another way to change the datatype of a field is from View. Right click on the data field which we want to change, select the ‘change Data Type’ field from the list, then click on the datatype of your choice.



Conclusion:


Data Types play a significant role in Tableau. Understanding and effectively managing data types in Tableau is crucial for accurate data representation and performance. By selecting the appropriate datatypes for our datasets, we can ensure that the Tableau processes and displays the data accurately and provides more meaningful insights and rich visualizations. In this blog we discussed about different data types of Tableau and hope this article will help you in your data analyst journey.


46 views

Recent Posts

See All
bottom of page