1 Reply Latest reply on Jan 29, 2014 5:39 AM by philmodjunk

    Problem with a calculated result using a summary field

    SteveH

      Title

      Problem with a calculated result using a summary field

      Post

           I have a report that shows summary total of a bunch of expenses from individual employees.  Each employee has an available budget that specific to that particular employee.  I want to calculate the remaining funds but so far the results FM has been giving me are incorrect.

            

           The calculation I'm using is:     Remaining = TotCost - Budget  

           With TotCost being a summary field of all costs.  The summary field and budget both display correctly, but the "Remaining" field does not after multiple employees are entered.  I'm sure I have bad logic somewhere and would appreciate any advice.

           Thanks!

            

            

        • 1. Re: Problem with a calculated result using a summary field
          philmodjunk
               

                    The summary field and budget both display correctly,

               I suspect that you are putting the summary field in a sub summary layout part? That will compute a subtotal, but when you refer to the summary field in a calculation, the summary field computes a grand total--a total based on the current found set.

               If that is correct, getSummary ( TotalCost ; BreakField ) can return the sub total. You specify the same "break field" as you do the "when sorted by" field for the sub summary part.