In this section, we will explore how to create basic charts in Tableau. Charts are fundamental to data visualization as they help in representing data in a graphical format, making it easier to understand and analyze. We will cover the following types of basic charts:
- Bar Charts
- Line Charts
- Pie Charts
- Scatter Plots
- Bar Charts
Bar charts are used to compare data across categories. They are one of the most common types of charts used in data visualization.
Steps to Create a Bar Chart
- Connect to Data Source: Ensure you have connected to your data source.
- Drag and Drop Fields: Drag a dimension (e.g., Category) to the Columns shelf and a measure (e.g., Sales) to the Rows shelf.
- Select Bar Chart: Tableau will automatically create a bar chart. If not, you can select the bar chart from the "Show Me" panel.
Example
1. Connect to the Sample - Superstore data source. 2. Drag the 'Category' field to the Columns shelf. 3. Drag the 'Sales' field to the Rows shelf. 4. Tableau will generate a bar chart showing sales for each category.
Practical Exercise
Task: Create a bar chart showing the total sales for each sub-category.
Solution:
- Connect to the Sample - Superstore data source.
- Drag the 'Sub-Category' field to the Columns shelf.
- Drag the 'Sales' field to the Rows shelf.
- Tableau will generate a bar chart showing sales for each sub-category.
- Line Charts
Line charts are used to show trends over time. They are ideal for visualizing data points in a continuous sequence.
Steps to Create a Line Chart
- Connect to Data Source: Ensure you have connected to your data source.
- Drag and Drop Fields: Drag a date field (e.g., Order Date) to the Columns shelf and a measure (e.g., Sales) to the Rows shelf.
- Select Line Chart: Tableau will automatically create a line chart. If not, you can select the line chart from the "Show Me" panel.
Example
1. Connect to the Sample - Superstore data source. 2. Drag the 'Order Date' field to the Columns shelf. 3. Drag the 'Sales' field to the Rows shelf. 4. Tableau will generate a line chart showing sales over time.
Practical Exercise
Task: Create a line chart showing the monthly sales trend.
Solution:
- Connect to the Sample - Superstore data source.
- Drag the 'Order Date' field to the Columns shelf.
- Right-click on the 'Order Date' field and select 'Month'.
- Drag the 'Sales' field to the Rows shelf.
- Tableau will generate a line chart showing monthly sales trends.
- Pie Charts
Pie charts are used to show proportions of a whole. They are useful for displaying the percentage distribution of categories.
Steps to Create a Pie Chart
- Connect to Data Source: Ensure you have connected to your data source.
- Drag and Drop Fields: Drag a dimension (e.g., Category) to the Columns shelf and a measure (e.g., Sales) to the Rows shelf.
- Select Pie Chart: From the "Show Me" panel, select the pie chart option.
- Adjust Marks: Drag the dimension to the 'Color' shelf and the measure to the 'Angle' shelf in the Marks card.
Example
1. Connect to the Sample - Superstore data source. 2. Drag the 'Category' field to the Columns shelf. 3. Drag the 'Sales' field to the Rows shelf. 4. From the "Show Me" panel, select the pie chart option. 5. Drag the 'Category' field to the 'Color' shelf in the Marks card. 6. Drag the 'Sales' field to the 'Angle' shelf in the Marks card.
Practical Exercise
Task: Create a pie chart showing the sales distribution by region.
Solution:
- Connect to the Sample - Superstore data source.
- Drag the 'Region' field to the Columns shelf.
- Drag the 'Sales' field to the Rows shelf.
- From the "Show Me" panel, select the pie chart option.
- Drag the 'Region' field to the 'Color' shelf in the Marks card.
- Drag the 'Sales' field to the 'Angle' shelf in the Marks card.
- Scatter Plots
Scatter plots are used to show the relationship between two measures. They are useful for identifying correlations and outliers.
Steps to Create a Scatter Plot
- Connect to Data Source: Ensure you have connected to your data source.
- Drag and Drop Fields: Drag one measure (e.g., Sales) to the Columns shelf and another measure (e.g., Profit) to the Rows shelf.
- Select Scatter Plot: Tableau will automatically create a scatter plot. If not, you can select the scatter plot from the "Show Me" panel.
Example
1. Connect to the Sample - Superstore data source. 2. Drag the 'Sales' field to the Columns shelf. 3. Drag the 'Profit' field to the Rows shelf. 4. Tableau will generate a scatter plot showing the relationship between sales and profit.
Practical Exercise
Task: Create a scatter plot showing the relationship between sales and discount.
Solution:
- Connect to the Sample - Superstore data source.
- Drag the 'Sales' field to the Columns shelf.
- Drag the 'Discount' field to the Rows shelf.
- Tableau will generate a scatter plot showing the relationship between sales and discount.
Conclusion
In this section, we have learned how to create basic charts in Tableau, including bar charts, line charts, pie charts, and scatter plots. These charts are fundamental tools for data visualization and will serve as the building blocks for more complex visualizations. In the next section, we will explore how to use marks and cards to enhance our visualizations.
Tableau Course
Module 1: Introduction to Tableau
- What is Tableau?
- Installing Tableau
- Tableau Interface Overview
- Connecting to Data Sources
- Basic Data Types and Structures
Module 2: Basic Visualization Techniques
- Creating Your First Visualization
- Using Marks and Cards
- Building Basic Charts
- Filtering Data
- Sorting and Grouping Data
Module 3: Intermediate Visualization Techniques
- Using Calculated Fields
- Creating Dual-Axis Charts
- Using Parameters
- Creating Maps
- Using Table Calculations
Module 4: Advanced Visualization Techniques
- Advanced Chart Types
- Using LOD Expressions
- Creating Dashboards
- Dashboard Actions
- Storytelling with Data
Module 5: Data Preparation and Transformation
Module 6: Advanced Analytics
Module 7: Performance Optimization
- Optimizing Workbook Performance
- Extracts vs Live Connections
- Reducing Load Times
- Performance Recording
- Best Practices for Performance
Module 8: Tableau Server and Online
- Introduction to Tableau Server
- Publishing Workbooks
- Managing Permissions
- Scheduling Extracts
- Collaborating with Tableau Online