Notification

The AppSheet Help Center documentation can now be viewed in Japanese - AppSheet ヘルプセンターのドキュメントが日本語で表示できるようになりました。. Learn more

SUM()

Arithmetic sum of list items

Returns the computed sum of the values in a list.

Sample usage

SUM(Classes[Seat Count]) returns the sum of all values in the Seat Count column of the Classes table. Equivalent to SUM(SELECT(Classes[Seat Count], TRUE)). See also: SELECT()

SUM([Discounts]) returns the sum of the items in the Discounts column value, where Discounts is of type List or EnumList.

SUM(LIST(1, 2, 3)) returns Number: 6

Sum values from select rows

Compute the total delivery charges recorded within a reporting period:

 

SUM(
  SELECT(
    Deliveries[DeliveryCharge],
    AND(
      ([DateDone] >= [_THISROW].[BeginDate]),
      ([DateDone] < [_THISROW].[EndDate])
    )
  )
)
  • SELECT(Deliveries[DeliveryCharge], ...) gets a list of delivery charges from select rows in the Deliveries table.
  • AND(..., ...) limits the SELECT() results to only those rows that match all of the conditions.
  • ([DateDone] >= [_THISROW].[BeginDate]) limits the count to only rows with a DateDone no earlier than the report's BeginDate.
  • ([DateDone] < [_THISROW].[EndDate]) further limits the rows to those with dates before the report's end date.
  • SUM(...) totals the values from the result of the SELECT().

See also: AND(), SELECT()

Common Problems

SUM(1, 2, 3) : the arguments are not in list form. To fix, wrap them in LIST() to construct a list: SUM(LIST(1, 2, 3)).

Syntax

SUM(list)

  • list - List of any numeric type.

Notes

AppSheet must be given enough context to determine what type of values list contains, that its contents are or will be numeric. To that end, list must be one of the following: a column value of type List that contains numeric values; a column list (such as, Products[Price]) for a column of a numeric type; or a constructed list (such as, with LIST()) of a numeric type.

See also

AVERAGE()

COUNT()

MAX()

MIN()

STDEVP()

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
Search
Clear search
Close search
Main menu
15534982992929956030
true
Search Help Center
true
true
true
false
false