Interacting with Data for Dashboards

Exclusive offer: get 50% off this eBook here
Tableau Dashboard Cookbook

Tableau Dashboard Cookbook — Save 50%

Over 40 recipes on designing professional dashboards by implementing data visualization principles with this book and ebook

$29.99    $15.00
by Jen Stirrup | May 2014 | Cookbooks

In this article by Jen Stirrup, the author of Tableau Dashboard Cookbook, we will apply the practice and theory of data visualization to dashboards. This will help deliver effective dashboards. We will learn to create Tableau dashboards quickly and easily.

(For more resources related to this topic, see here.)

Hierarchies for revealing the dashboard message

It can become difficult to manage data, particularly if you have many columns. It can become more difficult if they are similarly named too. As you'd expect, Tableau helps you to organize your data so that it is easier to navigate and keep track of everything.

From the user perspective, hierarchies improve navigation and use by allowing the users to navigate from a headline down to a detailed level. From the Tableau perspective, hierarchies are groups of columns that are arranged in increasing levels of granularity. Each deeper level of the hierarchy refers to more specific details of the data.

Some hierarchies are natural hierarchies, such as date. So, say Tableau works out that a column is a date and automatically adds in a hierarchy in this order: year, quarter, month, week, and date. You have seen this already, for example, when you dragged a date across to the Columns shelf, Tableau automatically turned the date into a year.

Some hierarchies are not always immediately visible. These hierarchies would need to be set up, and we will look at setting up a product hierarchy that straddles across different tables. This is a nice feature because it means that the hierarchy can reflect the users' understanding of the data and isn't determined only by the underlying data.

Getting ready

In this article, we will use the existing workbook that you created for this article.

We will use the same data. For this article, let's take a copy of the existing worksheet and call it Hierarchies. To do this, right-click on the Worksheet tab and select the Duplicate Sheet option. You can then rename the sheet to Hierarchies.

How to do it...

  1. Navigate to the DimProductCategory dimension and right-click on the EnglishProductCategoryName attribute.

  2. From the pop-up menu, select the Create Hierarchy feature. You can see its location in the following illustration:

  3. When you select the option, you will get a textbox entitled Create Hierarchy, which will ask you to specify the name of the hierarchy.

  4. We will call our hierarchy Product Category. Once you have entered this into the textbox, click on OK.

  5. Your hierarchy will now be created, and it will appear at the bottom of the Dimensions list on the left-hand side of Tableau's interface.

  6. Next, go to the DimProductSubcategory dimension and look for the EnglishProductSubCategoryName attribute. Drag it to the Product Category hierarchy under EnglishProductCategoryName, which is already part of the Product Category hierarchy.

  7. Now we will add the EnglishProductName attribute, which we will find under the DimProduct dimension. Drag-and-drop it under the EnglishProductSubCategoryName attribute that is already under the Product Category hierarchy. The Product Category hierarchy should now look as follows:

  8. The Product Category hierarchy will be easier to understand if we rename the attributes. To do this, right-click on each attribute and choose Rename. Change EnglishProductCategoryName to Product Category.

  9. Rename EnglishProductSubcategoryName to Product Subcategory by right-clicking on the attribute and selecting Rename.

  10. Rename EnglishProductName to Product.

  11. Once you have done this, the hierarchy should look as follows:

  12. You can now use your hierarchy to change the details that you wish to see in the data visualization. Now, we will use Product Category of our data visualization rather than Dimension.

  13. Remove everything from the Rows shelf and drag the Product Category hierarchy to the Rows shelf. Then, click on the plus sign; it will open the hierarchy, and you will see data for the next level under Product Category, which are subcategories.

  14. An example of the Tableau workbook is given in the following illustration. You can see that the biggest differences occurred in the Bikes product category, and they occurred in the years 2006 and 2007 for the Mountain Bikes and Road Bikes categories.

  15. To summarize, we have used the Hierarchy feature in Tableau to vary the degree of analysis we see in the dashboard.

How it works…

Tableau saves the additional information as part of the Tableau workbook. When you share the workbook, the hierarchies will be preserved.

The Tableau workbook would need revisions if the hierarchy is changed, or if you add in new dimensions and they need to be maintained. Therefore, they may need some additional maintenance. However, they are very useful features and worth the little extra touch they offer in order to help the dashboard user.

There's more...

Dashboarding data usually involves providing "at a glance" information for team members to clearly see the issues in the data and to make actionable decisions. Often, we don't need to provide further information unless we are asked for it, and it is a very useful feature that will help us answer more detailed questions. It saves us space on the page and is a very useful dashboard feature.

Let's take the example of a business meeting where the CEO wants to know more about the biggest differences or "swings" in the sales amount by category, and then wants more details. The Tableau analyst can quickly place a hierarchy in order to answer more detailed questions if required, and this is done quite simply as described here. Hierarchies also allow us to encapsulate business rules into the dashboard. In this article, we used product hierarchies. We could also add in hierarchies for different calendars, for example, in order to reflect different reporting periods. This will allow the dashboard to be easily reused in order to reflect different reporting calendars, say, you want to show data according to a fiscal year or a calendar year. You could have two different hierarchies: one for fiscal and the other for the calendar year. The dashboard could contain the same measures but sliced by different calendars according to user requirements.

The hierarchies feature fits nicely with the Golden Mantra of Information Visualization, since it allows us to summarize the data and then drill down into it as the next step.

See also

Classifying your data for dashboards

Bins are a simple way of categorizing and bucketing values, depending on the measure value. So, for example, you could "bin" customers depending on their age group or the number of cars that they own. Bins are useful for dashboards because they offer a summary view of the data, which is essential for the "at a glance" function of dashboards.

Tableau can create bins automatically, or we can also set up bins manually using calculated fields. This article will show both versions in order to meet the business needs.

Getting ready

In this article, we will use the existing workbook that you created for this article.

We will use the same data. For this article, let's take a copy of the Hierarchies worksheet and by right-clicking on the Worksheet tab, select the Duplicate Sheet option. You can then rename the sheet to Bins.

How to do it...

  1. Once you have your Bins worksheet in place, right-click on the SalesAmount measure and select the Create Bin option. You can see an example of this in the following screenshot:

  2. We will change the value to 5. Once you've done this, press the Load button to reveal the Min, Max, and Diff values of the data, as shown in the following screenshot:

  3. When you click on the OK button, you will see a bin appear under the Dimensions area. The following is an example of this:

  4. Let's test out our bins! To do this, remove everything from the Rows shelf, leaving only the Product Category hierarchy. Remove any filters from the worksheet and all of the calculations in the Marks shelf.

  5. Next, drag SalesAmount (bin) to the Marks area under the Detail and Tooltip buttons. Once again, take SalesAmount (bin) and drag it to the Color button on the Marks shelf. Now, we will change the size of the data points to reflect the size of the elements. To do this, drag SalesAmount (bin) to the Size button.

  6. You can vary the overall size of the elements by right-clicking on the Size button and moving the slider horizontally so that you can get your preferred size.

  7. To neaten the image, right-click on the Date column heading and select Hide Field Names for Columns from the list.

  8. The Tableau worksheet should now look as follows:

  9. This allows us to see some patterns in the data. We can also see more details if we click on the data points; you can see an illustration of the details in the data in the following screenshot:

  10. However, we might find that the automated bins are not very clear to business users. We can see in the previous screenshot that the SalesAmount(bin) value is £2,440.00. This may not be meaningful to business users.

    How can we set the bins so that they are meaningful to business users, rather than being automated by Tableau? For example, what if the business team wants to know about the proportion of their sales that fell into well-defined buckets, sliced by years?

    Fortunately, we can emulate the same behavior as in bins by simply using a calculated field. We can create a very simple IF… THEN ... ELSEIF formula that will place the sales amounts into buckets, depending on the value of the sales amount. These buckets are manually defined using a calculated field, and we will see how to do this now.

  11. Before we begin, take a copy of the existing worksheet called Bins and rename it to Bins Set Manually.

  12. To do this, right-click on the Sales Amount metric and choose the Create Calculated Field option.

  13. In the calculated field, enter the following formula:

    If [SalesAmount] <= 1000 THEN "1000" ELSEIF [SalesAmount] <= 2000 THEN "2000" ELSEIF [SalesAmount] <= 3000 THEN "3000" ELSEIF [SalesAmount] <= 4000 THEN "4000" ELSEIF [SalesAmount] <= 5000 THEN "5000" ELSEIF [SalesAmount] <= 6000 THEN "6000" ELSE "7000" END

  14. When this formula is entered into the Calculated Field window, it looks like what the following screenshot shows. Rename the calculated field to SalesAmount Buckets.

  15. Now that we have our calculated field in place, we can use it in our Tableau worksheet to create a dashboard component.

  16. On the Columns shelf, place the SalesAmount Buckets calculated field and the Year(Date) dimension attribute.

  17. On the Rows shelf, place Sum(SalesAmount) from the Measures section.

  18. Place the Product Category hierarchy on the Color button.

  19. Drag SalesAmount Buckets from the Dimensions pane to the Size button on the Marks shelf.

  20. Go to the Show Me panel and select the Circle View option. This will provide a dot plot feel to data visualization. You can resize the chart by hovering the mouse over the foot of the y axis where the £0.00 value is located.

  21. Once you're done with this, drag-and-drop the activities. The Tableau worksheet will look as it appears in the following screenshot:

To summarize, we have created bins using Tableau's automatic bin feature. We have also looked at ways of manually creating bins using the Calculated Field feature.

How it works...

Bins are constructed using a default Bins feature in Tableau, and we can use Calculated Fields in order to make them more useful and complex. They are stored in the Tableau workbook, so you will be able to preserve your work if you send it to someone else.

In this article, we have also looked at dot plot visualization, which is a very simple way of representing data that does not use a lot of "ink". The data/ink ratio is useful to simplify a data visualization in order to get the message of the data across very clearly. Dot plots might be considered old fashioned, but they are very effective and are perhaps underused. We can see from the screenshot that the 3000 bucket contained the highest number of sales amount. We can also see that this figure peaks in the year 2007 and then falls in 2008. This is a dashboard element that could be used as a start for further analysis. For example, business users will want to know the reason for the fall in sales for the highest occurring "bin".

See also

  • Visual Display of Quantitative Information, Edward Tufte, Graphics Press USA

Tableau Dashboard Cookbook Over 40 recipes on designing professional dashboards by implementing data visualization principles with this book and ebook
Published: May 2014
eBook Price: $29.99
Book Price: $49.99
See more
Select your format and quantity:

Actions and interactions

We can make the dashboard more effective by highlighting certain aspects of data visualization. Basically, when the user hovers over the data point, it will highlight the column and row where the data point is found. Highlighting the data means that other irrelevant data points are grayed out, thereby emphasizing the relevant data points. This is a useful dashboarding tool because the relevant features are made more prominent, thereby enhancing the speed with which the data is understood.

We can create highlights using the Actions feature in Tableau. To create a highlight action, use the following options:

  • For workbooks, we can find an Actions option under the Worksheet menu item.

  • When we move towards creating a full dashboard, we can find dashboard actions under the Dashboard menu item. For now, we are looking at creating components that will go onto a dashboard, so we will stick with the worksheet feature for now.

Getting ready

In this article, we will use the existing workbook that you created for this article.

We will use the same data as before. For this article, we will take a copy of the Bins Set Manually worksheet and select the Duplicate Sheet option. You can then rename the sheet to Actions.

How to do it...

  1. Once you have your worksheet in place, you will need to locate the correct Actions item. To do this, go to the Worksheet menu and look for Actions. You can see an example of this in the following screenshot:

  2. This will bring up the Actions dialog box. The following is an example:

  3. In the Actions dialog box, select the Add Action button; this will bring up some options. We will choose the Highlight option.

  4. Once we have selected the Highlight option, you will see the Edit Highlight Action dialog box appear, which you can see in the next screenshot.

  5. We will call this Bin Highlight Action, and it will be based on the Actions worksheet.

  6. We will then choose the Hover option.

  7. For the Target Highlighting option, select all of the fields. The dialog box will then appear as shown in the following screenshot:

  8. Now, click on OK and then go back to the Tableau worksheet. We will change the Tableau worksheet so that we can see the result of the action.

  9. On the Columns shelf, place the Product Category hierarchy, the SalesAmount Buckets, and the Year(Date) dimension attribute.

  10. On the Rows shelf, select SUM(SalesAmount). We will place Year(Date) on the Color button.

  11. Finally, select Discrete (Lines) from the Show Me panel in order to show the patterns over the years for each bucket type. You can see an example of this in the following screenshot:

  12. If you hover the mouse over one of the bucket names, you will see that the relevant data points are highlighted. In the following example, when we hover the mouse over the 1000 bucket, we can see that it lights up the data points for that bucket; plus, the relevant years are highlighted. It's clear that other data points are grayed out.

How it works...

To summarize, we can use Actions to highlight data, and this functionality assists with the comparison process. Business users do not have to type in any information to achieve this result; a simple mouse hover will give them the patterns that they are looking for.

See also

  • Show Me the Numbers: Designing Tables and Graphs to Enlighten, Stephen Few, Analytics Press

Summary

In this article, we guided you through to the next stage after summarizing your data, interacting with your data, and providing more details where appropriate to enhance the story on the dashboard. We learnt to interact in a better way with data.

Resources for Article:


Further resources on this subject:


Tableau Dashboard Cookbook Over 40 recipes on designing professional dashboards by implementing data visualization principles with this book and ebook
Published: May 2014
eBook Price: $29.99
Book Price: $49.99
See more
Select your format and quantity:

About the Author :


Jen Stirrup

Jen Stirrup is an award-winning, internationally recognized business intelligence and data visualization expert, author, data strategist, and technical community advocate. She has been repeatedly honored, along with peer recognition, as one of the top 100 most globally influential tweeters on Big Data topics. Jen has over 16 years of experience in delivering Business Intelligence and data visualization projects for companies of various scales across the world.

Books From Packt


Tableau Data Visualization Cookbook
Tableau Data Visualization Cookbook

Microsoft Silverlight 5: Building Rich Enterprise Dashboards
Microsoft Silverlight 5: Building Rich Enterprise Dashboards

Building Dashboards with Microsoft Dynamics GP 2013 and Excel 2013
Building Dashboards with Microsoft Dynamics GP 2013 and Excel 2013

Highcharts Cookbook
Highcharts Cookbook

Microsoft Tabular Modeling Cookbook
Microsoft Tabular Modeling Cookbook

Big Data Analytics with R and Hadoop
Big Data Analytics with R and Hadoop

Sage ACT! 2011 Dashboard and Report Cookbook
Sage ACT! 2011 Dashboard and Report Cookbook

Microsoft Dynamics CRM 2011: Dashboards Cookbook
Microsoft Dynamics CRM 2011: Dashboards Cookbook


Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software