Online tableau training, tableau tips, & video tutorials
How to Make a Timeline in TableauPreview
A new way for visualizing data over time
This video shares how to make a timeline in Tableau and how to add an optional reference line to display the current day.
This is Ryan with Playfair Data TV. In this video, I’m going to be using this visualization that I use to track my speaking engagements to show you how to make a timeline in Tableau. This is kind of a unique chart type that’s not available outside of the box in Tableau. But I think it’s really effective any time you’re trying to visualize some type of schedule in the context of a dashboard. So for example, you could line up a timeline with a line graph to show when you had some type of big marketing campaign go out.
So that’s what we’re going to build here today. I’m going to start a new worksheet so that I can build this from scratch. Timelines are created first with a special baseline. And to create that baseline, there’s two ways to do it. This is a hack that I use so frequently that I normally go ahead and make it as a measure. So that’s why you’ll see, if you download this from Tableau Public, you’ll see a field called Placeholder a lot of times in my visualizations. And if you see an equal sign preceding a calculated field, you can right-click on it and click Edit to open it up.
And this is the entire formula, min 0. Again, I use this so often that I usually go ahead and make a measure out of it. But you could also simply place this on the rows shelf by double-clicking and typing min 0. So this is a way to make a calculated field in the flow of your analysis. But all that does is it guarantees that this line is always at 0. The y-axis, the value, is always 0. It’s just a placeholder.
I’m now going to break up that measure by a dimension of date. So I’m going to right-click, drag date to the columns shelf, and I’m going to choose Date discrete. And you can start to see this come together. Actually, I’m going to switch this to Date Continuous so that we’ve got a continuous axis. You can start to see this come together, and we just have a flat line.
We haven’t specified anything more granular than the entire file, so we just see a continuous line all the way across the dates. But to be able to see the individual events, I’m going to add something that’s unique to each event to the detail marks card. In my case, each event has a unique link, so that’s what I’m going to put onto the detail marks card.
And now you can really start to see this coming together. Instead of that long flat line, there is a circle for each of my events. The mark type is technically still a line, so to make this look a little bit better, I can use this drop down and change the mark type from automatic, which is line, to circle. Now I have some formatting flexibility. I could make these a little bit bigger, I could color them if I wanted to. But we’ll call that good for now.
This next part is optional, but you can also add a reference line for today’s date. If you want to keep track of where you’re at in the context of today, you can set up another calculated field. And the whole formula is right here just as today. That’s going to bring back the date of today. In order to add this as a reference line, it needs to also be on the detail marks card. So I’m going to drag today to the detail marks card.
And there is a change I need to make here. I need to make this the exact date. So I’m going to click into the pill and choose Exact Date. And then to add this as a reference line, my preferred method is to simply right-click on the axis and click Add Reference Line. And if I use this drop down for value, I can choose between the two dates that are on the view, either on the y-axis, or the date that we just added to the detail marks card, which is the one I’m going to choose.
You can see that show up. Today is June 19, 2018, so it shows up there. And then I can also customize that label a little bit. I don’t like how it says minimum today. So I’ll change that to custom, and I’ll just type in the word today.
Lastly, also optional, this is purely just for formatting. But because I make my placeholder always align with the number 0, it creates a 0 line. And that makes it very easy to modify the format of that because 0 lines always have some type of format, and you can find that by right-clicking anywhere on the view and clicking format.
And it’s this last tab for lines. We’re changing the 0 lines here. Instead of a dotted line, I could change that to be maybe a solid line, maybe make it a little bit thicker, I could change the color, whatever you’d like to do. But we’ve just created a new chart type in Tableau. This was how to make a timeline.
This is Ryan with Playfair Data TV – thanks for watching!
Related video: How to Make a Line Graph in Tableau
Related video: How to Conditionally Format Individual Rows and Columns in Tableau Like You Can in Excel
Related blog post: How to Make a Timeline in Tableau
Related visualization: Where’s Ryan?
Chart Types Videos
- 3 Ways to Make Beautiful Bar Charts in Tableau
- 3 Ways to Make Lovely Line Graphs in Tableau
- How to Make Dual-Axis Combination Charts in Tableau and Some Creative Applications
- Exercise: Dual-Axis Combination Chart
- 3 Ways to Make Handsome Highlight Tables in Tableau
- 3 Ways to Make Stunning Scatter Plots in Tableau
- Exercise: Make a Scatter Plot in Tableau
- How to Make a Timeline in Tableau
- How to Make Dynamic Bump Charts in Tableau
- How to Make Bullet Graphs in Tableau
- How to Make a Waterfall Chart in Tableau
- Two Ways to Make Dynamic Slope Graphs in Tableau