15 Replies Latest reply on Jul 18, 2018 9:16 AM by lashon gaines

    How to aggregate an aggregation

    lashon gaines

      Hello,

       

      I am using Tableau 10.2 and I am having an issue aggregating a set of data because its already aggregated the totals seem to add instead of subtract.  I created these calculations and I need the variance between the two. I tried using subtract but it seemed to add anyway.

       

      SUM({FIXED[Group Name],DATEPART('month', [Last Certified]) :COUNTD(IF Year([Last Certified])=2018

      THEN [Plan #]END)})

       

      SUM({FIXED[Group Name],DATEPART('month', [Scheduled Due Date]) :COUNTD(IF Year([Scheduled Due Date])=2018

      THEN [Plan #]END)})

       

      My Final Calc:

       

      [month completed by grp]-[month scheduled by grp]  THIS GAVE ME THE TOTAL BUT IT SEEMED TO ADD IT INSTEAD OF SUBTRACT IT.

       

      I am looking to subtract the top calculation from the bottom one to get the variance between the two. Can someone please assist?