Step 4: Make a bar chart

This is a preview of the chart that we will be trying to make. It shows the average delay by airline, sorted from smallest delay to largest delay.

Get to know the chart controls

Now that we've explored the "Data" panel, take a moment to look at the rest of the screen. You should see a blank workspace for creating a chart. While there are a lot of controls available to use in the Tableau interface, there are only 6 key components that you need to become familiar with in order to get started.

These components are:

  1. Data pane. This panel on the left-hand side contains all of the variables from your data source.
  2. Columns shelf. You can drag-and-drop variables here to create the horizontal axis (x-axis) of your chart.
  3. Rows shelf. You can drag-and-drop variables here to create the vertical axis (y-axis) of your chart.
  4. View. This is the area where your chart will be displayed. When the view is empty, you can also drag variables into any of the "drop field here" areas to start creating a chart.
  5. Marks card. You can drag-and-drop variables here to plot data on an existing chart or to change the way that that plotted data is being displayed.
  6. Filters card. You can drag-and-drop variable here to filter or sort data plotted on a chart.

Drag-and-drop variables to make a chart

To begin making a chart, drag-and-drop the "Airline" variable into the “Rows" shelf. You should see a table appear with rows for each of the airlines.

Next, drag the "Average Delay" variable into the “Columns” shelf. You should see a bar chart appear. Congrats, you’ve just made your first chart!

Check Tableau's assumptions

Take a moment to consider this chart and to notice how Tableau has tried to helpfully interpret our drag-and-drop actions. If you look at the "Columns" shelf, you can see that our "Average Delay" variable now has the function "SUM()" surrounding it. This indicates that Tableau has taken our original data and aggregated it by airline in order to give us the chart that we requested.

However, while summing up all of the values for an airline makes sense for many variables (ex. summing "Number of Flights" would give us the total number of flights by airline), with the "Average Delay" variable it would be more appropriate to aggregate the data by taking the average.

To change the way that this variable is being aggregated, click on the "Average Delay" variable in the "Columns" shelf, click on the white triangle that appears, and then click on "Measure (sum)", followed by "Average."

You should now see the "AVG()" function surrounding the "Average Delay" variable, indicating that the data is now being aggregated using the average.

Improve your chart

This is already a helpful bar chart, but it would be more useful if the airlines were sorted from smallest delay to largest delay. To do this, drag-and-drop the "Airline" variable into the "Filters" card. You will be prompted with a lot of advanced options, but you can go ahead and accept the defaults by clicking "OK."

Then click on the "Airline" variable, click on the white triangle that appears, and then select "sort."

To set the sorting to be from smallest average delay to largest average delay, select the following settings:

  • For "Sort By," select "Field"
  • For "Field Name," select "Average Delay"
  • For "Aggregation," select "Average"

Then close the sorting window by clicking the "X" in the upper right-hand corner of the window. You should now see the data sorted from smallest to largest delay.

Name your chart

Lastly, name your chart so that you will easily be able to find it again. To do this, right click on "Sheet 1," click "Rename," and type "Average Delay." Then press enter or click on something else to complete the naming process.