1 Reply Latest reply on May 28, 2015 8:31 AM by philmodjunk

    inverse to sum(field)

    HelderSantos_1

      Title

      inverse to sum(field)

      Post

      Hi,

      Is there any funtion inverse to sum(field)

      Ex: If want to subtract all values on same field, what is the best way to do?

      Thanks

        • 1. Re: inverse to sum(field)
          philmodjunk

          Can you provide a more detailed example of what you are trying to accomplish?

          This sounds like something where you can subtract the sum (that computes a sub total) from a grand total value, or you might simply sum the value of a sign where your field has been multiplied by negative 1 to invert its sign...

          But sum can produce very different results depending on exactly what you are putting between the parenthesis.

          Sum ( field ), if used exactly like that, only returns the value of Field as you are computing the sum of a single value in a single field.

          Presumably, you meant: Sum ( RelatedTable::Field ) --which sums the value of Field over all the related records.

          But you could also have meant:

          Sum ( RepeatingField ) --which sums the repetitions of the repeating field.

          or

          Sum ( Field1 ; field2 ; field3  )