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.
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.
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.
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.
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 |
Figure 2: Example of geographic information organized by location.
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.
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. |
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
- Open Tableau Desktop.
- Connect to your data source.
- Open a worksheet or the Data Source page.
- Locate the required field in the Data Pane or metadata area.
- Open the field's drop-down menu.
- Select Change Data Type.
- Choose the appropriate data type.
- 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.
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.
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
- Open Tableau Desktop.
- Connect to an Excel or CSV sales dataset.
- Open the Data Source page.
- Review the available column names.
- Identify the data type of each field.
- Locate string and numeric fields.
- Identify date and date-time fields.
- Check whether geographic fields are recognized.
- Correct any inappropriate field types.
- 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
- What is a data field in Tableau?
- What is a data type?
- What is a String data type?
- What is the difference between whole and decimal numbers?
- What is the purpose of a Date field?
- What is a Boolean data type?
- What is a geographic role?
- Why should data types be checked before analysis?
Practical Questions
- Connect Tableau to a sample sales dataset.
- Identify all fields in the dataset.
- Find the String and Number fields.
- Identify the Date fields.
- Check the geographic role of a City field.
- Change a field's data type where appropriate.
- Use the fields to create a basic visualization.
Interview Questions
- Explain data fields and data types in Tableau.
- What are the common data types supported by Tableau?
- What is the difference between String and Number data types?
- How does Tableau handle Date and Date & Time fields?
- Why might an Employee ID be stored as a String?
- How do you change a field's data type?
- What is the purpose of geographic roles?
- 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.