Create Waffle Chart in Tableau

As a data analyst, I was analyzing our company’s sales data using Tableau. In the data, I wanted to know how much of our total sales came from the Furniture category. It could have been done by showing the sales percentage in a bar chart, but I wanted a chart that shows the sales share in a clear view.

To visualize the sales share of the Furniture category out of overall sales, I created a Waffle Chart in Tableau. Using this chart, I displayed the 10×10 grid where each square stands for 1% of total sales. For example, if the Furniture sales share is 32%, it will fill 32 squares out of 100 in the grid.

In this tutorial, I will explain the Waffle chart in Tableau and how to use it to show data distribution or the share of a dimension out of the total.

What is a Waffle Chart in Tableau?

In Tableau, a waffle chart is used to display the percentages or parts of a whole, using a grid of squares to represent the data. The Tableau waffle chart represents proportions, making it helpful in comparing categories or tracking progress. Each square in the grid represents 1% of the total, allowing for precise analysis of the data’s distribution. 

Check out: Create Lollipop Chart in Tableau

Create a Waffle Chart in Tableau

To create a Waffle chart in Tableau, we will use the Tableau superstore data. To show grids in the Tableau chart, we will use the excel file WaffleTemplate. xlsx. This file contains 100 rows, each containing: Column (1 to 10), Percentage (0.01, 0.02, …, 1.00), Row (1 to 10).

In Tableau, we can create a Waffle chart using single and multiple categories, which I will explain in the steps below.

Create a Waffle Chart in Tableau With Single Category

In this example, we will create a waffle card using a single category (furniture) to show its share in total sales.

Now, open the Tableau and follow the steps below to create a Waffle chart.

  1. In the Tableau, connect the data to Microsoft Excel and select the Superstore data. Then click on Add in data source and select the file WaffleTemplate.
  1. Now, we need to join the data from both Excel files. For this, drag the Orders from the superstore and sheet1 to the canvas.

After this, click on the line connection between both data sources, and map the ROW ID from the superstore data to the Rows from the waffle template.

Tableau Waffle Chart

With this, we can compare each percentage square of the waffle chart to the actual Furniture sales percentage.

Check out: Create Pareto Chart in Tableau

  1. Now, click on the sheet and add Rows to the row shelf and Column to the column shelf. In both Rows and Columns, change their type to Dimension from Measure.
Dimensions in Tableau Waffle Chart
  1. Now, change the Marks type to square to display the squares of the Waffle chart. To increase the size of the squares, adjust the slider from the Size card.
Waflle Chart for One dimension in Tableau
  1. To calculate the share of sales for the Furniture category, create a formula field using the following formula. Label the field as “Furniture Sales %” and enter the formula below.
{ FIXED : SUM(IF [Category] = "Furniture" THEN [Sales] END) / SUM([Sales])}

In this calculated field, FIXED ensures the percentage is calculated for the entire dataset, excluding the WaffleTemplate rows. The numerator sums only Furniture category sales, and the denominator sums all sales.

  1. To fill in the color in the Waffle chart squares according to the sales share of the furniture category, we will create another calculated field. Label the field as Fill and enter the formula below.
IF [Percentage] <= [Furniture Sales %] THEN "Filled" ELSE "Empty" END
  1. Add the calculated field Fill to the Color card in the Marks section. Reverse the Row axis so the chart fills from top-left. For this, right-click on the axis, select Edit Axis > select Reversed in scale.
Add Color to Waffle Chart in Tableau

Here, the first 32 squares in the chart are filled, indicating that the share of the Furniture category is 32% and the rest of the unfilled squares belong to other categories.

Check out: Butterfly Chart in Tableau

  1. To add a percentage label on each block in the waffle chart, add a field Index(0) in the marks section. Click on the Index() and select Compute using > Table across marks down.

After this, add the Index(0) to the Label card. Now, on the chart, we can see the filled squares count from 1 to 32 and the unfilled squares count from 1 to 68.

Tableau Waffle square chart

At last, hide the row and column headers; for that, click on the axis and uncheck Show header.

Create a Waffle Chart in Tableau

This way, we can create a Waffle chart in Tableau for a single category by following the above steps.

Check out: Create Radial Bar Chart in Tableau

Create a Waffle Chart in Tableau With Multiple Categories

In this example, we will create a Waffle chart that allows us to use multiple categories. In this, we will show the share of sales percentage for all three categories of the Products that are Furniture, Technology, and Office Supplies.

For this Waffle chart, we will take the Superstore data and the WaffleTemplate.xlsx file.

Follow the steps below to create a Waffle Chart with multiple categories in Tableau.

  1. First, we need to join the data from both files. In Tableau, there is another way through which we can quickly connect to another dataset.

First, connect the Superstore data from the Excel file, then click on the dropdown of Superstore data on the canvas and select New Data Resource.

Create Waffle chart for multiple category
  1. In the New Data Resource, select the WaffleTemplate.xlsx file, and then you will see that both datasets are connected.
Tableau Multi category Waffle chart
  1. Select a sheet and from the waffle file data, add the Rows field to Rows and add Column to the Columns shelf.

After this, select the Marks type as Square, and increase the size of squares in the waffle chart using the Size card.

Waffle Chart in Tableau

Check out: Build Histogram in Tableau

  1. To display the sales percentage of all Categories, we will create the following formula fields.
  • Furniture:
SUM(
    IF [Category] = "Furniture" THEN [Sales] END
) / SUM([Sales])
  • Office Supplies:
SUM(
    IF [Category] = "Office Supplies" THEN [Sales] END
) / SUM([Sales])
  • Technology:
SUM(
    IF [Category] = "Office Supplies" THEN [Sales] END
) / SUM([Sales])
  1. Now, create a calculated field that will display the color distribution in waffle chart squares according to their share of the total sales percentage. Label the calculated field as Sales distribution and enter the formula below.
IF AVG(([Rows]*10) - (10 - [Column]))
    <= ROUND([Orders (Superstore data 2025)].[Furniture] * 100) THEN "Furniture"

ELSEIF AVG(([Rows]*10) - (10 - [Column]))
    <= ROUND(([Orders (Superstore data 2025)].[Furniture] + [Orders (Superstore data 2025)].[Office Supplies]) * 100) THEN "Office Supplies"

ELSE "Technology"
END

Check out: Create a Map Chart in Tableau

  1. Now, drag the calculated field to the Color card in the Marks section. This will show the color distribution in the waffle chart squares according to the color assigned to the category.
Tableau custom Waffle Chart

This way, we can create a Waffle chart in Tableau with multiple categories.

I hope, in this tutorial, you have understood what a Waffle Chart is in Tableau and how it can help visualize the share of sales or parts of a whole in a grid format of a waffle chart. By following the steps for both single and multiple categories, you can now create Waffle Charts in Tableau to highlight data such as share and distribution of sales.

You may like to read:

Agentforce in Salesforce

DOWNLOAD FREE AGENTFORCE EBOOK

Start with AgentForce in Salesforce. Create your first agent and deploy to your Salesforce Org.

Salesforce flows complete guide

FREE SALESFORCE FLOW EBOOK

Learn how to work with flows in Salesforce with 5 different real time examples.