12 Replies Latest reply on Oct 26, 2015 7:24 AM by khaja mohiuddin

    How do I display the grand total for averages when using a table calculation?

    Julie Sok

      Hi,

       

      I am having trouble displaying the grand total for my average calculation. I've been following Jonathan Drummey's post on customizing grand totals

      http://drawingwithnumbers.artisart.org/customizing-grand-totals-part-2/ but I think that I am running into trouble because of my table calculations.

       

      window avg calc:

       

      IF FIRST()==0 THEN WINDOW_AVG(AVG([CAMP_TOT_COMMIT_AMT]),0,IIF(FIRST()==0,LAST(),0))

      END

       

      In the calculation above, I had to take the average of the CAMP_TOT_COMMIT_AMT because my totals were duplicating based on the number of  field visits (please refer to the workbook). The averages displayed per row come out correct but both the subtotals and grand total are incorrect. I did see a way to customize grand totals using MIN () and MAX () but I'm not sure how or if I can do that if I'm working with calculated fields. Any help would be greatly appreciated, thank you in advance!