Master Tableau From Scratch

Learn Tableau fundamentals, data connections, data preparation, filtering, data modeling, calculations, LOD expressions, visualizations, dashboards, and storytelling through structured practical lessons.

COURSE SYLLABUS

Data Fields and Data Types

Understand how Tableau identifies, organizes, and interprets fields from connected data sources. Learn about field names, data types, data roles, geographic fields, and how correct data types help create accurate visualizations.

1. Introduction to Data Fields and Data Types

When Tableau connects to a data source, it reads the available columns and identifies them as fields. Each field contains information about a particular attribute or measurement in the dataset.

Tableau assigns a data type to each field so that it can understand how the values should be interpreted and used in visualizations, calculations, filters, and analysis.

What You Will Learn

  • Understand fields in Tableau.
  • Identify different data types.
  • Understand string, number, date, and Boolean fields.
  • Recognize geographic and spatial data types.
  • Change field data types when required.
  • Understand default field properties.
  • Identify common data type problems.

2. What Is a Data Field?

A data field represents a column or attribute in a dataset. Fields describe the information stored in a table and are used by Tableau to build visualizations.

For example, a sales dataset may contain fields such as Order ID, Customer Name, Region, Order Date, Sales, and Profit. Each field represents a different type of information.

Example: Sales Dataset

Order ID Customer Name Region Order Date Sales Profit
1001 Rahul North 2026-01-10 25000 5000
1002 Priya South 2026-01-12 18000 3500
1003 Amit West 2026-01-15 12000 2000
1004 Neha East 2026-01-18 32000 7500

In this dataset, Order ID, Customer Name, Region, Order Date, Sales, and Profit are individual data fields.

3. Understanding the Structure of Data Fields

A dataset is generally organized into rows and columns. Columns represent fields, while rows represent individual records or observations.

Order ID Customer Region Sales Profit 1001 Rahul North 25000 5000 1002 Priya South 18000 3500 1003 Amit West 12000 2000 Fields / Columns Rows represent individual records. Columns represent data fields.

Figure 1: Structure of a dataset showing fields and records.

Important Terms

  • Field: A column or attribute in a dataset.
  • Record: A row containing related values.
  • Field Name: The label identifying a column.
  • Field Value: An individual value stored in a field.
  • Data Type: The type of information represented by a field.

4. What Are Data Types in Tableau?

A data type defines the kind of value stored in a field. Tableau uses data types to determine which operations, calculations, and visualizations are appropriate for that field.

For example, a date field can be used for time-based analysis, while a numeric field can be used for mathematical calculations.

Common Tableau Data Types

  • String
  • Number (Whole)
  • Number (Decimal)
  • Date
  • Date & Time
  • Boolean
  • Geographic Role
  • Spatial Data Types, where supported

5. String Data Type

A String data type represents text-based information. It can contain letters, words, symbols, and numeric-looking values that are intended to be treated as text.

Examples of String Fields

Field Name Sample Value Purpose
Customer Name Rahul Sharma Customer identification.
Region North Geographical category.
Product Name Laptop Product identification.
Postal Code 411001 Location identifier stored as text when appropriate.

Uses of String Fields

  • Grouping records by category.
  • Filtering customer or product names.
  • Displaying labels in visualizations.
  • Creating text-based calculations.
  • Identifying descriptive attributes.
Tip: A numeric-looking value is not always a number. Postal codes, phone numbers, and customer IDs are often better represented as strings because mathematical operations are not meaningful for these identifiers.

6. Number Data Types

Numeric data types represent values that can be used in mathematical operations and calculations. Tableau supports whole-number and decimal-number representations.

Number (Whole)

Whole numbers are values without a fractional decimal component.

Examples: 10, 250, 1000, 50000.

Number (Decimal)

Decimal numbers contain a fractional component and are useful for representing measurements and values that require precision.

Examples: 10.5, 250.75, 99.99, 12.345.

Field Example Value Possible Data Type
Quantity 25 Number (Whole)
Sales Amount 25000.50 Number (Decimal)
Profit 5000.75 Number (Decimal)
Employee Count 150 Number (Whole)

Uses of Numeric Fields

  • Calculating total sales.
  • Finding average profit.
  • Comparing product quantities.
  • Creating charts based on numeric values.
  • Performing mathematical calculations.

7. Date Data Type

A Date data type represents calendar dates such as day, month, and year. It is useful for analyzing business activities over time.

Examples

  • 2026-01-10
  • 2026-05-15
  • 2026-12-31

Uses of Date Fields

  • Monthly sales analysis.
  • Year-wise performance comparison.
  • Quarterly business reports.
  • Daily transaction analysis.
  • Time-based filtering.
Example: A sales manager can use Order Date to analyze how sales change from month to month.

8. Date & Time Data Type

Date & Time fields contain both calendar date and time information. They are useful when analysis needs to consider the exact time at which an event occurred.

Examples

  • 2026-01-10 10:30:00
  • 2026-05-15 14:45:30
  • 2026-12-31 23:59:59

Business Use Cases

  • Analyzing transaction timestamps.
  • Monitoring application events.
  • Tracking order processing times.
  • Studying hourly customer activity.
  • Analyzing service response times.
Important: Check the date format and time zone when connecting date and time data. Different source systems may represent timestamps differently.

9. Boolean Data Type

A Boolean data type represents a logical value. It generally contains two possible values: True or False.

Examples

Field Value Meaning
Is Active True The record is active.
Is Delivered False The order is not delivered.
Payment Completed True The payment is completed.

Uses of Boolean Fields

  • Filtering active and inactive records.
  • Identifying completed transactions.
  • Monitoring order delivery status.
  • Creating conditional calculations.
  • Grouping records by logical conditions.

10. Geographic Data Types and Roles

Tableau supports geographic roles that help identify location-related fields. These roles allow Tableau to interpret geographical values and use them in map visualizations.

Examples of geographic fields include Country, State, City, Postal Code, and other supported geographical identifiers.

Examples of Geographic Fields

Field Sample Value Geographic Role
Country India Country/Region
State Maharashtra State/Province
City Pune City
Postal Code 411001 Postal Code
Country: India State: Maharashtra City: Pune Postal Code: 411001

Figure 2: Example of geographic information organized by location.

Tip: If Tableau does not recognize a location correctly, verify the geographic role and check whether additional location context is required.

11. Spatial Data Types

Spatial data represents geographical shapes and locations. Tableau supports spatial data capabilities for supported spatial formats and connectors.

Common Spatial Concepts

  • Point: Represents a specific location.
  • Line: Represents a path or linear feature.
  • Polygon: Represents an enclosed geographical area.
  • Geometry: Represents spatial shapes and coordinates.

Business Applications

  • Mapping store locations.
  • Analyzing delivery routes.
  • Studying geographical sales patterns.
  • Comparing regional boundaries.
  • Visualizing geographical service coverage.
Important: Spatial data support depends on the source format, connector, and Tableau version. Do not assume every spatial file type is supported by every connector.

12. Understanding Data Type Indicators

Tableau uses field icons in the Data Pane to help users identify the types of data available in a connected data source.

Data Type Example Common Usage
String Customer Name Text-based analysis.
Number (Whole) Quantity Count and numeric calculations.
Number (Decimal) Sales Amount Financial calculations.
Date Order Date Date-based analysis.
Date & Time Created At Timestamp analysis.
Boolean Is Active True/False analysis.
Geographic Role City Map visualization.
Best Practice: Learn to identify field types from the Data Pane. This helps you understand which fields can be used for calculations, filters, maps, and other visualizations.

13. How to Change a Data Type in Tableau

Sometimes Tableau may interpret a field using a data type that does not match the intended analysis. Users can change a field's data type when the conversion is supported and appropriate.

Steps to Change a Data Type

  1. Open Tableau Desktop.
  2. Connect to your data source.
  3. Open a worksheet or the Data Source page.
  4. Locate the required field in the Data Pane or metadata area.
  5. Open the field's drop-down menu.
  6. Select Change Data Type.
  7. Choose the appropriate data type.
  8. Review the field values and visualization behavior.

Example: Changing a Numeric Field to String

Suppose an Employee ID field contains values such as 1001, 1002, and 1003. These values identify employees and are not intended for mathematical calculations.

You may change the field to String so that Tableau treats it as an identifier rather than a measure used for numeric aggregation.

Important: Changing a field's data type can affect calculations, filters, sorting, and visualizations. Review the result after making the change.

14. Default Properties of Data Fields

Tableau allows users to configure default properties for fields. These settings help maintain consistent behavior and formatting across worksheets.

Common Field Properties

  • Default Number Format: Controls how numeric values are displayed.
  • Default Aggregation: Defines the default aggregation for supported measures.
  • Default Color: Sets a default color for a field when used in a view.
  • Default Sort: Controls the default sorting behavior.
  • Geographic Role: Defines how location values are interpreted.
  • Aliases: Provides alternative display names for supported field values.

Example

A sales analyst can configure a numeric field to display values using an appropriate currency format. This makes reports easier for business users to understand.

15. Common Data Type Problems

Incorrect data types can lead to unexpected results in Tableau. Before building visualizations, review the field values and confirm that Tableau has interpreted them correctly.

Problem Possible Cause Suggested Solution
Numbers treated as text Non-numeric characters or incorrect source formatting. Review the source values and convert the field where appropriate.
Dates not recognized Unsupported or inconsistent date formats. Check the source date format and correct the field type.
Postal codes lose leading zeros Identifier interpreted as a number. Use String when the value is an identifier.
Incorrect geographic locations Missing or incorrect geographic role. Assign the correct role and provide location context.
Unexpected null values Invalid conversions or missing source values. Inspect the source data and conversion results.
Unexpected aggregation Field interpreted as a measure or aggregated differently. Review the field role and aggregation settings.

16. Data Field Validation Workflow

Validating field names and data types is an important step before creating worksheets and dashboards.

Source Data Inspect Records and Columns Identify Field Names and Values Verify Data Types and Roles Correct If Required Analyze Create Views Tableau Field Validation Process Validate data before using it in reports and dashboards.

Figure 3: Recommended workflow for validating Tableau data fields.

17. Practical Exercise

Task: Identify Data Fields and Data Types

Use a sample sales dataset containing customer, region, order date, quantity, sales, and profit.

Exercise Steps

  1. Open Tableau Desktop.
  2. Connect to an Excel or CSV sales dataset.
  3. Open the Data Source page.
  4. Review the available column names.
  5. Identify the data type of each field.
  6. Locate string and numeric fields.
  7. Identify date and date-time fields.
  8. Check whether geographic fields are recognized.
  9. Correct any inappropriate field types.
  10. Open a worksheet and use the fields in a visualization.

Expected Learning Outcome

After completing this exercise, you should be able to identify different field types and understand how Tableau interprets connected data.

18. Practice Questions

Basic Questions

  1. What is a data field in Tableau?
  2. What is a data type?
  3. What is a String data type?
  4. What is the difference between whole and decimal numbers?
  5. What is the purpose of a Date field?
  6. What is a Boolean data type?
  7. What is a geographic role?
  8. Why should data types be checked before analysis?

Practical Questions

  1. Connect Tableau to a sample sales dataset.
  2. Identify all fields in the dataset.
  3. Find the String and Number fields.
  4. Identify the Date fields.
  5. Check the geographic role of a City field.
  6. Change a field's data type where appropriate.
  7. Use the fields to create a basic visualization.

Interview Questions

  1. Explain data fields and data types in Tableau.
  2. What are the common data types supported by Tableau?
  3. What is the difference between String and Number data types?
  4. How does Tableau handle Date and Date & Time fields?
  5. Why might an Employee ID be stored as a String?
  6. How do you change a field's data type?
  7. What is the purpose of geographic roles?
  8. What problems can occur because of incorrect data types?

19. Summary

In this lesson, we learned about data fields and data types in Tableau. We understood how fields represent columns in a dataset and how data types define the kind of information stored in those fields.

We explored String, Number, Date, Date & Time, Boolean, Geographic, and Spatial data concepts. We also learned how to identify field types, change data types, configure field properties, and troubleshoot common data interpretation problems.

Correct data types help Tableau perform suitable calculations, filters, geographic analysis, and visualizations. In the next lesson, we will explore Dimensions and Measures, two important concepts used throughout Tableau analysis.