How to Create Waffle Chart in Tableau
top of page

Tableau charts: Waffle chart

Updated: May 17, 2021


Tableau waffle chart

Waffle chart just like the pie chart and doughnut chart display parts to whole. This chart is basically a square divided into a grid of 10 x 10. Each grid box representing 1% of the whole 100% piece. The number of grid boxes that are colored or shaded is determined by the associated metrics e.g. sales growth, population growth or any other metric you can think of.

So, how do we create this waffle chart in Tableau?

The first step to creating a waffle chart is creating a data structure to help us map the grids.

Prepare Data Structure

The goal of creating this data structure is to help us plot the 10 x 10 square grids each grid representing 1%. To help us achieve this, we’ll create an excel template having data in the three columns shown in the snap shot below.

Sample data

Note: You can populate the same data in your own excel sheet or download a copy of the same data here to follow along.

Open the excel sheet in Tableau

Once connected to the excel sheet in the link above;

  • Convert the measure fields ‘Columns’ and ‘Rows’ to dimension fields, by dragging them from the measure area to the dimension area.

  • Drag now dimension fields ‘Rows’ and ‘Columns’ to the Rows and Columns shelf's respectively.

  • Drag the measure field ‘Percent’ to the label shelf.

Data grid

Order the labels

The next step is ordering the labels so as to have 1% (.01) start on the bottom left corner and 100% (1.0) at the top right corner. To achieve this, sort ‘Rows’ in descending order.

Ordering labels

Format the label to Percent

Format the labels to percent by > Right clicking on SUM(Percent) > select Format > under Pane > choose Numbers > Percentage > minimize decimal places to zero.

Formatting labels to percent

Executing this we’ve;

Add color to enable comparison by adding metric of interest

At this stage, you can connect to your data set of interest to build calculations for comparison against the percent values of the waffle chart.

However, for this case, instead of connecting to a new data source, I will create the metric for comparison using the calculated field below.

This calculation helps create 51% as a metric for comparison in this case.

Create a Boolean field using the calculation below;

Tableau Boolean function

Drag the calculated field ‘Color Field’ to the color shelf.

Change the view into a grid Squares

Under marks card, select ‘Square’.

Grid squares

Remove SUM(Percent) from the label shelf.

removing labels
  • Resize the viz.

  • Hide the ‘Columns’ and ‘Rows’ headers.

  • Adjust the size of the grids under Size shelf.

Resizing tableau waffle chart

Note: Assuming you had connected to a different data set to enable comparison, all you will need to do is to use filters to change your level of analysis. However, for this demo which is based on a static calculated field, I will have to create every metric of interest manually which is tedious.

(Advisable to load comparison data instead of manually imputing metrics of interest)

Annotate the view

Let’s add annotation to make our viz more legible. Right click on any point within the view > under annotate select > Mark.

On the box, delete all except ‘SUM(Metric of Interest)

(If for your case this aggregation is not there, you'll need to drag it from the measure field to the detail shelf)

Format appropriately.

Annotating tableau waffle chart

Similarly, you can create other views using different metrics in the same way and combine them on a dashboard to create your story.

Tableau waffle chart final

I hope this article was helpful to you. To receive more of the Tableau tips and tricks, kindly join our mailing list by subscribing below.

Thank you for reading.


Blog.png
Black & white.jpg

About Me

More About the Author

Bernard K

Analytics Consultant | 3X Tableau Certified

Bernard is a data analytics consultant helping businesses reveal the true power of their data and bring clarity to their reporting dashboards. He loves building things and sharing knowledge on how to build dashboards that drive better outcomes.

Let’s discuss your data challenges! Let’s work together!

bottom of page