1 Reply Latest reply on Jan 12, 2014 1:58 PM by Steve Martin

# Can I divide the Grand Total row by a calculated field to get a new row of averages?

Hi, I'm brand new to Tableau and haven't been able to find an answer after lots of googling and experimenting. I am trying to figure out how to calculate a row "Per Store Average" using Grand Totals as the numerator (is that even possible or do I need to manually create a table calculation for Totals and work off that?).

So far I have built the table below and am missing the highlighted piece:

• Net Revenue is a table calculation (Gross Revenue minus Returns).
• Grand Total is just the default Column Grand Totals
• Store Count ("a") is a calculated field
• How do I divide the Grand Total row by Store Count to get the Per Store Average row? I believe table calculations can only be displayed as columns and not rows (if that makes sense). The formatting can change but I need to calculate Per Store Averages for all three columns. Thanks for any help!

• ###### 1. Re: Can I divide the Grand Total row by a calculated field to get a new row of averages?

Hi Althea,

Think you may be looking for total divided by average; in your table (above), create a calculated field with the formula: Total(Sum([Gross Revenue]))/Avg([Gross Revenue])

Apply the cf to the text mark then right-mouse click the pill to change the compute using to Product Category.

Total is a window calculation and in this situation is finding the total of the specified window (Gross revenue) then dividing it against the Product Category values