1 Reply Latest reply: Feb 6, 2012 2:04 PM by Stefan Wühl RSS

    Sum Only Expression Help!

      Hi gang, i need your help. I need to sum only regional contracts. I have a listing of contracts, and some of them are tagged as "regional." How can i sum only regional contracts using an expression?

       

      VendorValueContract Type
      Ricks' Car$10Regional
      Jim Auto$55Regional
      J&J taxi$5Local

       

      the answer would be $65 (Ricks and Jims total)

       

      Regards,

      Brian

        • Sum Only Expression Help!
          Stefan Wühl

          Brian, you could use a sum(if()) for this

           

          =sum( if([Contract Type] = 'Regional', Value))

           

          or equivalent, but better performing a set expression

          =sum( {<[Contract Type]={Regional}>} Value)

           

          Just put this expression in a chart object, e.g. a text box.

           

          Hope this helps,

          Stefan