Sum the values in a column if all the conditions are true.
SumIf(<number>, <condition 1 True/False>…)
number (required) Column of numbers to add together. Null values are skipped.
condition 1 (required) Logical condition that returns a result that is either True or False. If the condition is True, the number on the corresponding row is added to the sum.
condition 1 (optional) Additional conditions can be added after the first condition.
SumIf( [Sales], [State] = “TX” )
- Returns the sum of all the sales in Texas.
More About Aggregate Functions
If the column being aggregated is grouped, then the aggregate is computed for each group. For example, if the worksheet is grouped by the column [Year], then placing Sum([Revenue]) on the [Year] level computes the revenue for each year.
The results of aggregate functions can be referenced by lower levels. An example would be to create a Sum([Amount]) column as Total and then an [Amount] / [Total] column as Percentage. This converts each Amount value into a relative percentage value.