Book Image

Learning Tableau 10 - Second Edition

Book Image

Learning Tableau 10 - Second Edition

Overview of this book

Tableau has for some time been one of the most popular Business Intelligence and data visualization tools available. Why? Because, quite simply, it’s a tool that’s responsive to the needs of modern businesses. But it’s most effective when you know how to get what you want from it – it might make your business intelligent, but it isn’t going to make you intelligent… We’ll make sure you’re well prepared to take full advantage of Tableau 10’s new features. Whether you’re an experienced data analyst that wants to explore 2016’s new Tableau, or you’re a beginner that wants to expand their skillset and bring a more professional and sharper approach to their organization, we’ve got you covered. Beginning with the fundamentals, such as data preparation, you’ll soon learn how to build and customize your own data visualizations and dashboards, essential for high-level visibility and effective data storytelling. You’ll also find out how to so trend analysis and forecasting using clustering and distribution models to inform your analytics. But it’s not just about you – when it comes to data it’s all about availability and access. That’s why we’ll show you how to share your Tableau visualizations. It’s only once insights are shared and communicated that you – and your organization – will start making smarter and informed decisions. And really, that’s exactly what this guide is for.
Table of Contents (17 chapters)
Learning Tableau 10 Second Edition
About the Author
About the Reviewers

Creating line charts

Line charts connect the related marks in a visualization to show movement or relationship between connected marks. The position of the marks and the lines that connect them are the primary means of communicating the data. Additionally, you can use size and color to visually communicate additional information.

The most common kind of line chart is a time series chart. Time series show the movement of values over time. They are very easy to create in Tableau and require only a date and a measure.

Continue your analysis of Superstore sales using the Chapter 01 Starter workbook that you saved earlier. The following are the steps to get the output of the Sales over time graph:

  1. Navigate to the Sales over time sheet.

  2. Drag the Sales field from Measures to Rows. This will give you a single, vertical bar representing the sum of all the sales in the data source.

  3. To turn this into a time series, you must introduce a date. Drag the Order Date field from Dimensions in the data pane on the left and drop it on Columns. Tableau has a built-in date hierarchy and the default level of year has given you a line chart connecting four years. Notice that you can clearly see an increase in sales year after year:

  4. Use the drop-down menu of the YEAR(Order Date) field on Columns (or right-click the field) and switch the date field to use the Quarter. You may observe that Quarter is listed twice in the drop-down menu. We'll explore the various options for date parts, values, and hierarchies in the Visualizing dates and times section of Chapter 3, Moving from Foundational to More Advanced Visualizations. For now, select the second option:

Observe the cyclical pattern that is quite evident when looking at the sales by quarter:

Iterations of line charts for deeper analysis

Right now you are looking at the overall sales over time. Let's do some analysis at a slightly deeper level:

  1. Navigate to the Sales over time (overlapping lines) sheet where you will find a view identical to the one you just created.

  2. Drag the Region field from Dimensions to Color. Now, you have a line per region with each line being a different color and a legend indicating which color is used for which region. As with the bars, adding a dimension to color splits the marks. However, unlike the bars where the segments were stacked, the lines are not stacked. Instead, the lines are drawn at the exact value for the sum of sales for each region and quarter. This allows for easy and accurate comparison. It is interesting to note that the cyclical pattern can be observed for each region, as shown:

With only four regions, it's fairly easy to keep the lines separate. What about dimensions that have more than four or five distinct values?

  1. Navigate to the Sales over time (multiple rows) sheet, where you will find a view identical to the one you just created.

  2. Drag the Category field from Dimensions and drop it directly on top of the Region field currently on the Marks card. This replaces the Region field with Category. You now have 17 overlapping lines. Often you'll want to avoid more than two to four overlapping lines. However, clicking an item in the color legend will highlight the associated line in the view. Highlighting can be a good way to pick out a single item and compare it to all others.

  3. Drag the Category field from Color on the Marks card and drop it on Rows. You now have a line chart for each category. Now you have a way to compare each product over time without overwhelming the overlap function. You can still compare trends and patterns over time. This is the start of a sparklines visualization that will be developed fully in the Advanced visualizations section of Chapter 10, Advanced Visualizations, Techniques, Tips, and Tricks.