4 Replies Latest reply on Jun 28, 2013 2:18 PM by Chad Kovac

# Grand Total sums and Grand Total Averages

I have grand total for "Sum of Custs" and "Manager Count" i need to have the average for "MOC" on the grand total row...  so on the grand total row after calculating of 27,376 divided by 3,190 I should see the number 8.6 on the Grand total row.

• ###### 1. Re: Grand Total sums and Grand Total Averages

Hi Kevin,

You can get this result by creating the following calculation:

sum([Number of Records])/sum([Manager Count])

To get the grand total to result in a decimal, right click on the calculation and select Field Properties-->Number Format... Number (Custom).

Hope this helps!

-Tracy

• ###### 2. Re: Grand Total sums and Grand Total Averages

This does give the correct average in the grand total row but then all the numbers in the individual rows are incorrect.  In my example the individual rows are correct but I can not get it to show me the average of those results.

• ###### 3. Re: Grand Total sums and Grand Total Averages

Hi Kevin,

The MOC calculation needs Level from FEC to work, but when Tableau calculates MOC in the Grand Total row it has taken Level from FEC out of the calculation. That's why you're not seeing any value there. I wrote a series of blog posts dealing with a variety of workarounds, check them out at http://drawingwithnumbers.artisart.org/customizing-grand-totals-part-1/. The solution I outlined in http://drawingwithnumbers.artisart.org/customizing-grand-totals-part-2 on customizing grand totals with table calculations should get what you need.

• ###### 4. Re: Grand Total sums and Grand Total Averages

I'm having this problem as well and those blog posts are above my head...

Why can't we just tell a grand total cell to be a SUM instead of an AVERAGE without all this secondary calculations on "fake" fields causing our output to not be formatted as nicely as it is when we just use subtotals and grand totals... /sigh

and, I can't post a packaged workbook.. the data is confidential.