0:00Hey, it's Tim here. Today we're going to
0:01show you how to build a line chart in just
0:03under two
0:04minutes. We're using the same life
0:06expectancy data I used for the histogram
0:08video, and this time
0:09around we're going to just look at the
0:10simple way to create a line chart. For this
0:12one I'm going to
0:13drag the year value, notice that it's green
0:14, we'll come back to that a little later, we
0:16'll put it on
0:17columns, and then we're just going to drag
0:18any of these other measures and put it on
0:20rows, and you'll
0:21see Tableau draws a line chart. It's that
0:23simple, but so many people fight with this
0:25chart type
0:26because they don't understand the
0:28difference between blue and green fields in
0:30Tableau,
0:31essentially discrete and continuous fields.
0:33You see at the moment the year field is
0:35green,
0:35but if I remove that field and then I go
0:38here to the year value and I make it
0:40discrete,
0:40you see it turns blue, and now when I drag
0:42it onto columns, Tableau draws a bar chart.
0:46And this is
0:46fundamental because if you allow Tableau to
0:48decide what chart types it's going to build
0:50for you,
0:51it will always make this distinction
0:53because it perceives discrete data as best
0:55displayed using
0:56a bar chart. How do you override that? Well
0:59here in the marks pane you can see you
1:01actually have
1:01an automatic setting. This is where Tableau
1:04is deriving its sort of automated chart
1:06selection
1:06for you. If you go ahead and manually
1:08select line, the line chart comes back, but
1:11it looks a bit
1:11different because at the bottom instead of
1:13having an axis you have the individual
1:15discrete years.
1:17If I then go back, go ahead, make this
1:20continuous again, clear the sheet by
1:22clicking this button at
1:22the top and draw that again with columns at
1:25the top and let's this time take adult
1:27mortality,
1:27you'll see at the bottom we get a range. So
1:30that is a line chart and hopefully I've
1:33also cleared up
1:34the biggest confusion around why Tableau
1:35behaves the way it does when you're trying
1:37to build a line
1:38chart inside a Tableau. If you want to add
1:40a little bit of flair you can always add
1:42context
1:43to this as well. For example if I take the
1:45countries I can put it on color and you can
1:47see
1:48this gets super noisy. So how can you make
1:50one country stand out compared to the
1:52others? Well
1:54here's a little trick you could do. You can
1:56go ahead and create something called a set.
1:58Let's
1:58go ahead and go here, select set. When we
2:00do that we can essentially pick out one
2:03country and select
2:04okay and then when we do that that country
2:06set is essentially remembered that one
2:08value. So if we
2:08want to look at Afghanistan versus all the
2:10other countries instead of country what we
2:12can do is we
2:13can go ahead and put country on color and
2:15this is a bit of an unfair comparison
2:17because if you notice
2:19Tableau is aggregating the adult mortality
2:20values. What we actually want to do is look
2:22at the average.
2:23So let's go ahead select average and now
2:26you can see that in blue we've got
2:28Afghanistan and all the
2:29other countries in gray but it's
2:31calculating the average for those countries
2:34. In 2002 there must
2:36have been an anomaly where there was no
2:38data collected but as you can see both
2:40charts are
2:40trending downwards but Afghanistan has a
2:42much higher adult mortality rate compared
2:45to all the
2:45other countries in the world. That's my
2:47time up hopefully you found this video
2:48valuable and I'll
2:49catch you in the next video. If you're not
2:51subscribed yet please subscribe it really
2:52helps the channel and I'll catch you soon.
2:54you
2:54you
2:59[ Silence ]