Build a Stacked Donut Chart in Tableau

Have you ever wanted to stack 4 pie charts on top of each other to build a visual? Let’s have some fun building out a stacked donut chart or a “TrailBlazer” chart as I call it due to its likeness to a particular NBA team’s logo.

Stacked Donut Chart Thumb

Portland Trailblazers anyone?

Stacked Donut vs Trailblazer

In order to build out this chart I used an innovative technique shared by Simon Runc on the Tableau forums. Feel free to check out that post here.

Using Tableau’s Sample Superstore Data, Simon came up with an innovative use of the INDEX() function and the Size functionality to create three different pie charts that each show a respective percentage of a measure (in this case Sales) to the Total amount of the measure.

For example, the chart highlights in red the percentage of Consumer Sales as a percentage of all segment sales (i.e., Consumer + Corporate + Home Office). The grey portions represent all other sales, other than the segment of interest.

The trick to this approach is using the Index function to create a pie chart per segment. For example Consumer is assigned a value of 1, Corporate a value of 2 and Home Office is assigned 3. When the INDEX() value is placed on size, the three different charts are assigned sizes where one is slightly larger than the next.

Stacked Donut Raw 2

With a little division and axis customization, the three segments are placed on top of each other to provide a stacked pie chart effect. The hole is courtesy of the standard methodology for creating a donut chart which involves a dual axis.

It makes much more sense when you see it in action so make sure to watch the video!

Here is an example of the raw stacked donut chart before the “TrailBlazer” formatting.

Stacked Donut Raw

Feel free to interact with the viz and download the workbook on Tableau public:

As always, If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

Definitely check out other posts of interest for building donut charts in Tableau:

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Build a Tableau Parameter Action Dashboard

This video is inspired by Filippos Lymperopoulos who has a great article on parameter action concatenation. Definitely check out his article here. I am a hands on person who learns from building and sharing, therefore I put together this video to explore, tweak and hammer home the concept.

In this video we’ll build a Sales Analysis dashboard in Tableau using Parameter Actions and the Concatenation Aggregation functionality. The great thing about this tip is that you can use it across multiple data sources. This is a must see!

This approach relies upon the use of two different data connections. In this manner our data tables are completely un-joined without an established relationship. We have a data-set comprised of a customer list and one comprised of customer transactions across three years.

The key to linking the data sets together relies upon the following calculated field which creates a de-facto set that we can use to highlight customer purchases:

Tableau Concat Calc Field

When we setup a concatenation parameter action on our dashboard, the very act of selecting a [Customer Name] will add that Customer Name to the parameter named [Selected Customer]. This will cause all selected customers to resolve to TRUE, which allows highlighting of the sales bar charts related to the user selected customers.

Tableau Concat Parameter Action Thumb1

In the screenshot above, notice the selected [Customer Name] values on the left hand side are also concatenated together at the bottom of the dashboard (i.e., Franciso Hernandez, Jose Garcia, and Terrye Marchi). All of their respective purchases are also highlighted in the middle of the dashboard.

Tableau Concat Calc Field Label

The above calculated field is used to only show the [QTY] purchased for the user selected customer and is placed on the bar chart label.

Feel free to interact with the viz and download the workbook on Tableau public:

As always, If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

How to Highlight the Bottom Bar Chart Values in Tableau

 

I decided to make this video after someone left a comment on another video I made titled “How to Highlight the Top 3 Bar Chart Values in Tableau” asking how to find the last three values.

Youtube Comment Highlight Bottom 3

In this video I will show you how to highlight the bottom three sales values on a bar chart. You’ll also learn how to use a parameter to dynamically change the number of lowest bars highlighted.

Bottom 3 Bar Chart Values Thumbnail

We can accomplish the highlighting of the bottom N bar chart values via two ways. We can either create a set or create a calculated field to accomplish this task. The set method is cleaner but has its limitations when multiple dimensions are used in the visual. Therefore, the calculated field approach serves us well when we add multiple dimensions.

Watch the video to see how it all comes together but the calculation boils down to this:

RANK(SUM(0-[Sales]))<=[Highlight Parameter]

By adjusting the [Highlight Parameter] control, the user can determine how many bottom sales values are highlighted in the visual. This method also maintains its functionality when an additional dimension is added to the visual.

As always, If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Create a Tableau Waffle Chart Fast and Easy

In this Tableau tutorial I am serving up some delectable waffles in the form of a fast and easy waffle chart. Watch the video to learn the easiest and quickest way to create a waffle chart in Tableau.

If you’re familiar with the Southeast United States then you know that we love The Waffle House down here. As an homage, I made a simple dashboard in the iconic Waffle House signage style.

A waffle chart depends upon a data connection to the data you wish to visualize and a data connection to the waffle chart template. Once you have these two items setup, you simply create a calculated field that marks the fill percentage in your waffle.

Help yourself to some waffles below:

As always, If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Create an Interactive Stacked Bar Chart in Tableau

In this post we’ll use the new parameter action functionality in Tableau to create an interactive stacked bar chart. When we select a dimension from the viz, we can drill down into a sub-dimension. Parameter actions are new to Tableau as of version 2019.2. In the video we use an NBA data set which you can download in a workbook if you visit my Tableau Public viz.

This neat little trick relies upon the creation of a parameter named [Team Name Parameter] and two dimensions.

  • Dimension #1 is the [Team Name]
  • Dimension #2 is the [Player Name]

There is an implied hierarchical relationship between [Team Name] and [Player Name] as teams are naturally comprised of players.

We will also create a calculated field named [Player Drill] that is defined as such:

IF [Team Name Parameter] = [Team Name] THEN [Player Name]
ELSE [Team Name]
END

When we place the [Player Drill] calculated field on color on the marks card and setup our parameter actions (watch the video for instruction), the user selection of a [Team Name] on the bar chart will feed the [Team Name Parameter]. This causes all of the players on the selected team to be displayed with their respective breakdown of points scored.

Bonus: There is a FIXED LOD lesson in this video as well as a Star Wars reference which I’m sure you’ll have no issue finding. Here’s a hint:

It’s really not complicated so don’t let all the words here confuse you. Just watch the video and do some great things with your data! Interact with the viz below:

As always, If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

This video was definitely inspired by Kevin Flerlage who has a great blog post on the uses of parameter actions in Tableau. Check it out here.

Tableau Sales Dashboard Tutorial using Table Calculations

In this Tableau data visualization tutorial, we’ll learn to use the LOOKUP table calculation function to return sales revenue for the same day last year. A number of different techniques are used in the creation of this dashboard.

I designed this dashboard solely as a teaching exercise to help you understand the LOOKUP function and how to show the same date last year in a separate column.

  • As we learned in a previous video¬†Tableau Table Calculations Simplified, (make sure to watch this video afterwards for more clarity), we’ll compute using specific dimensions and then use “At the level” to make sure our LOOKUP table calculation is performing correctly.
  • The “Show Missing Values” option is selected to fill in date gaps in the data set that do not exist. Ensuring 365 dates per year are present in the visualization enables the offset (i.e., -1) in the LOOKUP calculation to arrive at correct sales revenue from the same day in the previous year.
  • You’ll learn that we can filter on a table calculation by using another table calculation. Filters based on table calculations do not filter out underlying data. Instead, the data is hidden from the view, allowing dimension members to be hidden from the view without impacting the data in the view.

Tableau Order of Operations

Observe the Tableau filter order of operations above. Applying a dimension filter before the Table Calculation filter removes underlying data which affects the proper functioning of Table calculations. Typically, Table Calculations only work on values that are visible in the view. By applying a table calculation (which is last in the order of operations) you preserve underlying data but filter out data from the view.

Interact with this dashboard via the picture link:

You need to read these posts and watch these videos for additional information:

As always, If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

All views and opinions are solely my own and do NOT necessarily reflect those my employer.

Tableau Sales Dashboard Tutorial: Year Over Year Comparison

In this Tableau data visualization tutorial I used a technique shared by Tableau Zen Master Ryan Sleeper to “equalize” dates across the same axis. This date equalization calculated field enables year over year, quarter over quarter, month over month, week over week and same day last year comparisons.

MAKEDATE(2018,MONTH([Your Date]), DAY([Your Date]))

Equalizer 2

Call in The Equalizer for this Analysis

It’s a pretty clever way of preserving the same month and day of date values across many years and updating their respective years to one common year.

For example, all dates would retain their current month and day but would share the year value of ‘2018’. In this manner, data points from various years can be stacked on top of each other for comparison purposes.


Additionally, by creating a parameter value for a specific date part (i.e., year, month, week, etc.,) the user has control over the level of comparisons in the visualization.

You’ll have to watch the video to see the details. Again, thanks to Ryan Sleeper for sharing this tip with the Tableau community which enabled me to apply it to my dataset and share it with you in video form.

As always, If you find this type of instruction valuable make sure to subscribe to my Youtube channel.

All views and opinions are solely my own and do NOT necessarily reflect those my employer.