The waffle chart is a 10 X 10 cell grid in which each cell represents 1 percentage point summing up to a total of 100%. A waffle chart depicts progress toward a goal or a percentage of completion. A grid of tiny cells is present, with colored cells representing the data. A chart can be divided into one or more categories. Multiple waffle charts can be combined to offer a comparison of various charts. Waffle charts can be represented with conditional formatting where cells are highlighted with different colors based on the percentage value of that KPI.
There are the following used cases of the Waffles chart:
To see a high-level view of items and their contribution to a whole
Showing different KPI percentage value
Uses Of Waffle Chart
To show the proportion of work completed.
To show the proportion of progress that has been accomplished.
To show the costs incurred in relation to the budget.
To show the profit percentage.
To depict the actual value attained in comparison to the established aim, as in sales.
To visualize the company’s development in relation to the goals that have been established.
To show the pass rate of a test in a college/city/state.
So let's see how to create a Waffle Chart.
Step 1: Connect to the Sample Superstore dataset.
Step 2:Create a calculated field for data densification. Data densification occurs when Tableau creates additional marks in the view to “compensate” for missing value; it also assigns to those marks the value it thinks it should have, based on surrounding values. Notice that these marks are not added to your data, but only to your view.
Click on Ship Mode and select create a calculated field. This will give us points that we will be using for data densification.
Step 3: Create the Path Bin. Click on the Path calculated field that we have created and select create Bin. Give the bin size as 1.
Step 4: Create a parameter named Columns which will allow us to select the number of columns that we want. Select the Data Type as Integer and the Current value as 10.
Step 5: Now we will create our grid. For this, we will create the following calculated fields.
Index: The Index will give us the index from 1.
Rows: We will divide the Index calculated field that we have created by the columns parameter that we have created. We will take integer values and exclude the decimals.
Columns:
Step 6: Now we will make our grid. Follow the below steps.
Drag Region and put it in columns.
Drag Columns calculated field that we have created and put it on columns.
Drag Rows calculated field and put it on rows.
Drag Path Bin and put it on rows.
Step 7: Click on the Path Bin and make sure Show Missing Values is selected. Then drag the Path bin from Rows to Details.
Step 8: Now we will compute our Rows and Columns calculated fields using Path Bin. Click on Columns and select Compute Using Path Bin
Similarly, Click on Rows and select Compute Using Path Bin. From the Marks Card, select the chart type as Square. We will get the following visualization.
Step 9: Now as we have our grid created, we will now apply our data to this grid to add the color. We will create a few table calculations so that our values can be shown in all these individual squares.
Both the calculated fields have the exact same formula, however, we are going to change how these are computed so that TC_TotalSales will be for the entire table and TC_Sales will be for each region.
Step 10: Now will create another calculated field for the percentage.
Step 11: Now we will create a calculated field for color.
Step 12: Now drag TC_Color to Color. Click on TC_Color and select Compute Using Path Bin.
Again click on TC_Color and select Edit Table Calculation. In Nested Calculation select TC_TotalSales and select Compute Using both Path Bin and Region as we want to show total sales using both path bin and region.
Step 13: Now double-click on Rows Axis and select Scale as Reversed.
After following the above steps, our visualization looks as follows.
Step 14: Now, we want to show different colors for each individual region. So we will edit our TC_Color calculated field.
After assigning the colors, this is how the visualization looks. We have a separate colors for different regions.
Step 15: Now in the Color Legend, let's assign a gray color for gray. Double-click on grey and select the gray color. Hide the headers by right-clicking on headers and unchecking Show Headers.
Step 16: Now drag the TC_Percentage in Columns between the Region and Columns calculated field. Right-click on TC_Percentage and select Discrete.
Step 17: Now let's do some formatting. Remove the grid lines and borders. Format the percentage to show 2 decimal places. After all the formatting, this is our final visualization.
Step 18: Now click on Format and select Animations and in Duration select 1 second.
Step 19:Drag Order Date to filters and select show filter. Right-click on the filter and select Single value list. When we select a different year the percentage value will change depending upon the year and the animation feature will let us see the value change in an animated way.
Conclusion
The Waffle chart is used for data that is perfectly flat and adds up to 100%. The proportion of a variable is highlighted to offer the representation by the number of highlighted cells. Many waffle charts are not made out of squares, but rather other forms, most often circles. Other forms, such as little icons, are also possible. Waffle charts with more (or less) than 100 units, where the elements reflect actual amounts rather than fractions or percentages, offer another option.