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:

  1. Bar Charts
  2. Line Charts
  3. Pie Charts
  4. Scatter Plots

  1. 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

  1. Connect to Data Source: Ensure you have connected to your data source.
  2. Drag and Drop Fields: Drag a dimension (e.g., Category) to the Columns shelf and a measure (e.g., Sales) to the Rows shelf.
  3. 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:

  1. Connect to the Sample - Superstore data source.
  2. Drag the 'Sub-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 sub-category.

  1. 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

  1. Connect to Data Source: Ensure you have connected to your data source.
  2. 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.
  3. 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:

  1. Connect to the Sample - Superstore data source.
  2. Drag the 'Order Date' field to the Columns shelf.
  3. Right-click on the 'Order Date' field and select 'Month'.
  4. Drag the 'Sales' field to the Rows shelf.
  5. Tableau will generate a line chart showing monthly sales trends.

  1. 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

  1. Connect to Data Source: Ensure you have connected to your data source.
  2. Drag and Drop Fields: Drag a dimension (e.g., Category) to the Columns shelf and a measure (e.g., Sales) to the Rows shelf.
  3. Select Pie Chart: From the "Show Me" panel, select the pie chart option.
  4. 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:

  1. Connect to the Sample - Superstore data source.
  2. Drag the 'Region' 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 'Region' field to the 'Color' shelf in the Marks card.
  6. Drag the 'Sales' field to the 'Angle' shelf in the Marks card.

  1. 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

  1. Connect to Data Source: Ensure you have connected to your data source.
  2. Drag and Drop Fields: Drag one measure (e.g., Sales) to the Columns shelf and another measure (e.g., Profit) to the Rows shelf.
  3. 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:

  1. Connect to the Sample - Superstore data source.
  2. Drag the 'Sales' field to the Columns shelf.
  3. Drag the 'Discount' field to the Rows shelf.
  4. 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.

© Copyright 2024. All rights reserved