4 Replies Latest reply on Sep 26, 2017 7:50 AM by Lukasz Malejczyk

# Grand Total Discrepancies

Hello,

I am having issues with my workbook in calculating column and row grand totals. I have read over several articles online to try and help me solve my problem but it was hard for me to apply their situation to my situation. I have computed the monthly detail correctly but the grand totals appear to be aggregating to another level. Any help on this would be greatly appreciated! Attached is a packaged workbook.

Thanks,

Derek

• ###### 1. Re: Grand Total Discrepancies

Hi Derek,

Can you highlight an example of where the grand total is wrong? And what you are expecting to see?

• ###### 2. Re: Grand Total Discrepancies

Sure!

The calculation I am using takes Gross Margin/Tons. So for example:

• The Gross Margin Per Ton for BP Toledo Domestic should be Total YTD Gross Margin/Total YTD Tons, in my data it would be -\$24,293/35,152 which would equal \$0.69.
• I am getting the result of -\$60.56 in my data set for the row total of BP Toledo Domestic

The monthly gross margin per ton is correct but the grand totals are not. Let me know if I should explain further.

Thanks,

Derek

• ###### 3. Re: Grand Total Discrepancies

Hi Derek,

Your calculation needs to be Sum([Gross Margin])/Sum([Tons]).

Without the Sum() Tableau computes each line in the dataset, which gives you the incorrect answer.

My version is Sheet 2