0:00Hey, Tim here. And in this quick tip video,
0:04I'm going to show you how to create a step
0:06line chart. A step line chart is a really
0:08effective way of just removing the noise
0:11from
0:11the traditional line chart. It makes it
0:13very easy to see trends over a larger
0:15period of
0:16time without having to make the user sort
0:18of suffer by giving them more detail than
0:21is required. I use this chart to affect in
0:24my most recent makeover Monday where I was
0:26showing Donald Trump's tweets over several
0:28years, but I was trying to highlight the
0:31volume.
0:32To create this line chart, it's actually
0:34quite a simple thing. So I'm going to show
0:35you how
0:35to do that now. It works really well over
0:38sort of continuous data, continuous periods
0:41of time, but you can use this in any
0:43situation where you're trying to showcase
0:46volume. And
0:47in this particular example, I took the data
0:49down to a day level, okay? And I brought in
0:52the number of records. So I was basically
0:54seeing how much data is in each given day.
0:56And when you look at this fizz, you can
0:57start to see the noise that I'm talking
0:59about. It's
0:59really hard for me to focus on the general
1:01trend, which if you squint, you can just
1:03sort
1:04of see this general shape happening here.
1:07And I want to bring that out to the user,
1:09make it a little bit more clear. So I'm
1:12going to use the fixed level of detail
1:13calculation
1:14to highlight this trend a little bit more
1:16clearly. So I'm just going to right click
1:18number of records and I'm going to create a
1:20calculated field. I'm going to hold control
1:22and move my mouse wheel up. You can also
1:25hold control plus to do this. And I'm just
1:27going
1:27to type out my calculation. I typically
1:29type everything out and then I start
1:30filling in
1:31the blanks. So if I type in fixed, this is
1:33what I need. Hit enter. I need the date
1:36truncation
1:36function. Hit enter. I'm just going to
1:40close that off. I need to do a sum for my
1:42number
1:42of records. Go to the end. Close off that
1:46sum and then close off the fixed level of
1:49detail calculation. But I've still got an
1:51error here because my date truncation doesn
1:53't
1:53have anything in it. What I need to do is
1:55truncate the date and time. And the reason
1:58I'm doing this is because I actually want
2:00to tell Tableau to stop aggregating the
2:01data
2:02at a higher level than what my
2:04visualization is showing. In this
2:06particular case, a week.
2:08So I'm just going to go in here and type in
2:11week in between the speech marks, which is
2:14the notation for this function. And you'll
2:16see that my calculation becomes valid. So
2:18let me just describe this calculation one
2:20more time. I'm aggregating the number of
2:23records
2:24and I'm fixing it for the given week.
2:27Because I don't have a calculation which is
2:30truncating
2:31at the week level, I'm doing it in the
2:33calculation. So what this will do is it
2:35will return the
2:36total for the week on every given day in
2:38that week. And that's the effect that
2:40creates the
2:40step line chart. So I'm just going to hit
2:43OK. But before I do that, I'm going to name
2:45this example just so it's easy to find. I'm
2:48going to hit supply and it's here. I'm just
2:51going to bring that out, put it right next
2:53to my other number of records and you can
2:55start to see the effect happening. If I
2:57just make the size of the line a little bit
2:59smaller,
3:00you can see it's much easier to see the
3:02individual trends within the months because
3:05I'm aggregating
3:05at a much, much easier level to understand.
3:08And because this data set goes over
3:09multiple
3:10years, it makes more sense. Now if I wanted
3:13to, I could change this aggregation. So
3:15maybe
3:15a week isn't correct. Maybe I'd like to
3:18aggregate this down to the month. I can
3:20just type that
3:21in, hit apply and you can see it's starting
3:25to aggregate again at that level. Now you
3:28have to be careful because these two charts
3:30aren't the same. If you look at the axis,
3:33this is now in the thousands whereas this
3:34is still in the hundreds. So whilst the
3:36trend
3:37might be the same, you have to be careful
3:38about what you do when you put them next to
3:40each other. You don't want to confuse the
3:42user by showing two things that are
3:43actually
3:44vastly different. But you can keep custom
3:47izing this, keep playing around, but it's a
3:49very,
3:49very simple effect and if you add some
3:51flourishes and design touches to it, you
3:53can make it
3:54look nice and neat and simple and it's a
3:57very, very simple way of understanding a
4:00lot of
4:00information. I hope you've enjoyed this
4:02quick tip. Check out the next one next week
4:04and
4:04I'll see you soon.