# Intro to Tableau: Line Chart: 3 or More Measures

## Note:

If you do not currently have Tableau, you can download a free version at: https://public.tableau.com/s/

# Line Chart: 3 or More Measures

This lesson is a continuation of an earlier lesson. If you are already familiar with Tableau, feel free to continue on. Otherwise, check out my first Tableau lesson: Line and Bar Charts

If you want to add 3 or more measures to a line chart, you need to take a different approach than in regular charts.

## Import the Data

If you are continuing on from the Line and Bar Charts lesson, you can skip this step, your data is already loaded.

## Create a New Worksheet

Click the New Worksheet icon found on the bottom of your screen.

Drag Year to Columns and Measure Values to Rows

1. Get rid of Sum(Number of Records) by dragging it back into Measures
2. While holding down Ctrl drag Measure Names from the Dimensions slot to Color

And there you have it. 3 Measures in one chart.

# Intro to Tableau: Dual Axis Charts

## Note:

If you do not currently have Tableau, you can download a free version at: https://public.tableau.com/s/

# Dual Axis Charts

This lesson is a continuation of an earlier lesson. If you are already familiar with Tableau, feel free to continue on. Otherwise, check out my first Tableau lesson: Line and Bar Charts

## Import the Data

If you are continuing on from the Line and Bar Charts lesson, you can skip this step, your data is already loaded.

## Create a New Worksheet

Click the New Worksheet icon found on the bottom of your screen.

Drag Year from Dimensions and Free from Measures into Columns and Rows respectively. You should now have a line chart. (if not, refer to Lesson 1 for troubleshooting tips)

Now, drag Full Price into Rows. You should now notice you have two graphs. Free up top and Full Price on the bottom.

Now you could just stop there. You do have both Measures graphed. But this really isn’t the best way analyze this data. It is hard to do a good comparison this way.

## Dual Axis

For better analysis, we are going to create a Dual Axis Chart.

Right click on the Y Axis of the bottom chart and select Dual axis

Now you have both measures on one graph.

If you look closely at the Left and Right Y-Axis’s, you will notice they are not the same. This could skew how someone would interpret this data.

To fix this, right click on the Right Y-Axis and select Synchronize axis

Finally, since both of your Y-Axis match up, you don’t need them both. Right click on the Right Axis again and uncheck Show header.

Previous > Lesson 1

Next > 3 or More Measures

# Intro to Tableau: Line and Bar Charts

## Note:

If you do not currently have Tableau, you can download a free version at: https://public.tableau.com/s/

# Lines and Bar Charts

## Start Tableau

When you start up Tableau, the first thing you need to do is select a data source.

In this case, select Excel and choose the file the you downloaded above (schoolLunch.xls)

Once loaded, the Data Source Page will open up.

a. Data Source File

b. Shows Sheets in the file (there is only one sheet in this particular file)

c. Shows data.

## The Data

In this example, we are looking at the number of kids receiving Free, Reduced Priced, and Full Price lunches at American public schools from 1971 to 2015.

## Line Chart

Start by making a new sheet

### A Quick Note About Dimensions and Measures:

Notice on the new sheet that the columns from your imported Excel sheet have been placed into two boxes on the left of the screen: Dimension and Measures. Think of Dimensions as Factors or Labels. While Measures are columns you would perform calculations against (adding, averaging, etc).

Drag Year from Dimensions and Free from Measures into Columns and Rows respectively.

The line graph should appear automatically. If not, follow the next steps:

First, make sure your Row variable says SUM(Free)this means we are summing up all numbers in the Free column— If it doesn’t, hover over the measure until a small downward arrow appears. Then go to Measure and select Sum.

If you don’t have a line chart, go to Marks and select Line from the drop down menu

## Bar Chart

Now, go to Marks again and select Bar. Your chart will change over to a bar chart. Try a few of the other options like Area and Shape.

Next Lesson: Dual Axis Charts

# Tableau: School Breakfast Program Participation

This area graph, created in Tableau, shows the impressive rise in school breakfasts being provided to American school children.

Workbook available at Tableau Public: Link to Workbook

Data taken from USDA Food and Nutrition Services: Link to data

# Tableau: CPI Food Prices 2013-2015

This visualization (made using Tableau) shows the CPI (Consumer Price Index) for common food items. While 2014 was bad year for staples such as dairy and meat, 2015 showed a nice recovery. The main exception being eggs. Look at the massive increase in egg prices caused by the bird flu epidemic of 2015.  **note the purple dot represents the 20-Year Historical Average.