1 Reply Latest reply on Aug 10, 2016 10:35 AM by alangodfrey

    How to create a total amount calculation in a report based on field entries

    mel617

      I am trying to create a calculation on revenue report that totals the $ amount that is entered in the "Contract New Price" field in all records in the database if the file Final_Sale_Rental = "Final Sale"

       

      I have created the below equation but seems to be pulling the value of the current record only but I need it to pull all the records that fit this criteria.

       

      If (Final_Sale_Rental = "New Final Sale Contract"; Sum (Contract New Price))

       

      I hope this makes sense. Any help would be appreciated.

        • 1. Re: How to create a total amount calculation in a report based on field entries
          alangodfrey

          You have a couple of issues:

          You say: "if the file Final_Sale_Rental = "Final Sale"

          but your calculation IF statement says: "Final_Sale_Rental = "New Final Sale Contract" "

           

          The SUM function will sum the totals in all of the fields listed, so Sum (Contract New Price) will sum the total of the Sum Contract New Price on that record.  If you want to add the totals of all the records with a certain status (by that calculation method) you need to create a relationship that relates to only those records, and then use Sum (ThatRelationship::Contract New Price).

           

          However it would probably be easier and more flexible to create a summary field, the Total of the Contract New price Field, and create a Grand summary or Sub-summary part and place that field in there.  You could Find only those records you want to add (if the summary field is in a Grand Summary part) or sort by that criterion (if the summary field is in a sub-summary part).