2 Replies Latest reply: Feb 5, 2013 11:53 PM by Avinash Jagilenki RSS

    Sum function

      HI ,

      in my chart i am using the expression


      =sum( {$<[Job discipline] = {"10"}, [Expense group] = {"Other"}>} Cost* BaseToSEKRate / AverageRate )


      For a particular job number


      The cost value is 600 , BaseToSEKRate is 5 and AverageRate is 5 . and

      cost value is 0 , BaseToSEKRate is 5 and AverageRate is 5


      now my expression has to give me 600 as output but due to duplicate records it is giving 1200 .


      What i can do so that it will not take the duplicate records into consideration.


      Please suggest.

        • Re: Sum function
          Pradip Sen

          Hi Avi Avinash,


          you can try with the following expression


          =sum({$<[Job discipline] = {"10"}, [Expense group] = {"Other"}>} Distinct Cost * BaseToSEKRate / AverageRate )


          Hope it will help you.

            • Re: Sum function

              Hi PR@D!P,


              Thanks fo rthe reply. I tried it earlier it is working fine but my question is .


              if i have a record like this


              jobnumber, cost,  BaseToSEKRate, AverageRate , type


              1 ,600,5,5,A




              Will it eliminate only the record 1,600,5,5,A since we are already having 1,600,5,5,A(in this case o/p will be 1200)

              or both


              1,600,5,5,A and give o/p 600