9 Replies Latest reply on Oct 30, 2014 9:12 AM by Anders Lam

    Subtotals on a calculated field

    Anders Lam

      Hi,

      I have reviewed the three steps in Jonathan Drummery's series on   Grand Totals and Subtotals | Drawing with Numbers but I can't still figure out how to correct this.  For reference, I have mocked up a twbx and kept it pretty simple.  I have one field (Planned for WP) which is the average of the results.  I have a second field which is the sum of the actuals.  I created a variance column which is (Avg Planned for WP) minus (Sum of Actual).  This works for each row but not at the subtotal and grand total level.

       

      Can someone guide me on how to fix it?  The Subtotal for the two individuals rows are correct.  I would like it to be the subtotal for "Planned for WP" minus "Actual" which would lead me to the correct result.  Or it could be the sum of the calculated variances for each of the line items.  Either would work but I can't get Tableau to work this way.

       

      Thanks,

      Anders