How do I create a waffle chart in Tableau Desktop?

Preparation time : 25 minutes

Level : Expert

Objective: Building a waffle chart

A waffle chart is a simple, aesthetic visualization used to represent proportions or percentages intuitively. Each square in the grid represents a unit of a total value, making this type of graph particularly useful for comparing shares or visualizing a distribution. Often used in marketing reports, financial analyses, or interactive dashboards, it helps decision makers and non-technical teams better understand data while making presentations more engaging and compelling.

Data required:

  • 1 data set, such as the accelerator Hypermarket offered at the bottom of the Tableau Desktop login page,
  • A measure, for example sales,
  • Two dimensions, such as Segment and Category.

Step 1: Prepare the data

  1. Create a calculated field and name it Path,
  2. Enter the formula:” IFF ([Segment] =” Company” ,1,100) ”,
  3. Create Classes from the field Path,
  4. Type the waistline From classes to 1,
  5. Create a parameter and name it @colonnes ,
  6. Choose value type as Entire and put the current value to 10.

Step 2: Indexing and positioning

  1. Create a calculated field and name it Index ,
  2. Enter the formula:” Index () -1 “,
  3. Create a calculated field and name it L, for lines,
  4. Enter the formula:” INT ([Index]/[@colonnes]) “,
  5. Create a calculated field C, for columns,
  6. Enter the formula:” [Index]% [@colonnes] ”.

Step 3: Set up the grid

  1. Drag the fields Category and C in the Columns,
  2. Swipe the field L In the Lines,
  3. Swipe the field Path (class) in the tab Detail ofthe landmark,
  4. Right click on the fields C and L and edit Calculated by choosing Path (class),
  5. In the coordinate system, choose the type of visualization to Carré.

Step 4: Add metrics and customize

  1. Create a calculated field and name it Waffle Sales,
  2. Enter the formula:” WINDOW_SUM (SUM ([Sales])) “,
  3. Duplicate the field and name it Waffle Total Sales, don't change the formula,
  4. Create a calculated field and name it Waffle Percentage,
  5. Enter the formula:” [Waffle Sales]/[Waffle Total Sales] “,
  6. Create a calculated field and name it Waffle Color,
  7. Enter color:” IF Index/WINDOW_MAX ([Index]) < [Waffle Percentage] Then “Color” Else “Gray” END ”.

Step 5: Add colors

  1. Swipe the field Waffle Color in the tab colour ofthe landmark,
  2. Right click on the field Waffle color and change the tab Calculated by with Path (class),
  3. Right-click the field again Waffle Color and select Edit the calculation table,
  4. Select field Waffle Total Sales and check the field Category.

Step 6: Finalize the view

  1. Change the axis L and Reverse the axis,
  2. Adjust the colors via the legend,
  3. Swipe the field Waffle percentage in the Columns, between the Category and C fields,
  4. Convert field to discrete value,
  5. Format The field towards Percentages,
  6. Personalize your view.

consultancy

If you want each waffle to have a different color, here are the steps to follow:

  1. Edit the field Waffle Color,
  2. Enter the following formula:” IF Index/WINDOW_MAX ([Index]) < Waffle Percentage Then WINDOW_MAX (MAX_ [Category])) Else “Grey” END “,
  3. Adjust colors via the legend.