10 Replies Latest reply on Aug 9, 2017 12:36 PM by alyssa.mcdonald

# Waffle Chart

Good morning,

I'm trying to create a waffle chart but am having trouble coming up with a formula to calculate the percentage per matter type.  For instance, Administration has 119 records out of a total of 10,053 records (119/10,053 = 1.18% of total).  Can someone help me figure out how to translate this into a formula?

Thank you

• ###### 1. Re: Waffle Chart

Can't open as currently running 10.1, but would this kind of thing work

COUNT([Number of Records])/ SUM({EXCLUDE [Matter Type]: Sum([Number of Records])})

Its worth a shot anyway.

Might even be SUM([Number of Records])/ SUM({EXCLUDE [Matter Type]: Sum([Number of Records])})

• ###### 2. Re: Waffle Chart

Hi Dave,

The first calculation helped however I'm unsure how to work with it in the waffle chart.  The Box to Color calculation is supposed to display orange boxes for the percent that the Matter Type makes up like the example with the green and grey boxes.  I would like the percent for each Matter Type to be displayed in the waffle chart as shown in the example (i.e. Administration makes up 10.2%).  The boxes in my workbook are showing 100%.  I'm not sure how to break it down to display each Matter Type by its percentage.

Tested with bar chart - formula works.

Link to tutorial: Tableau Tip Tuesday: How to Create Waffle Charts

Thank you so much for your help thus far!

• ###### 3. Re: Waffle Chart

I tried to separate it by Matter Type and I got an error.  Something came up about establishing relationships because Matter Type is from a different data source than Box to Color.

• ###### 4. Re: Waffle Chart

Have you created relationships and then clicked the link symbol next to the linked dimensions?

• ###### 5. Re: Waffle Chart

How would I do that?  Sorry, I'm new to Tableau.  I don't think I would have anything to link them together though.  The waffle chart template has no common fields with my actual data source.

• ###### 6. Re: Waffle Chart

Ah, slightly confused.  You won't be able to link it then, what might work is to right click on the data source and select Replace Data Source, replace Waffle with Metric, this should copy all the calcs over to the Metric data source

• ###### 7. Re: Waffle Chart

It didn't work but that's okay.  Thank you for all your help!

• ###### 8. Re: Waffle Chart

Alyssa,

I think there are some complications arising from trying to bring over the Level of Detail calc

used in the calculation of the percent.

I'm not sure if this will work for you, but I redid the datasources a little bit.

Namely, I made a Key of 1 and joined the two sheets together (please see attached).

This allowed for the pulling the percentage over, but it did create some complications

due to duplication of values. This was accommodated for by using some divide by 100s

here and there, and then a multiply by 100 as well.

Will need to clean it up in terms of those 100s, but just wanted to give you something that

might serve as a starting point.

• ###### 9. Re: Waffle Chart

Does this post help at all:

1 of 1 people found this helpful
• ###### 10. Re: Waffle Chart

I'll try it.  Thank you so much for all your help!