Description
The SUMIFS function calculates the sum of a range of numbers that meet multiple criteria.
Usage
This function is used to sum numbers in a specified range that match the provided criteria.
Syntax:SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], …)
Examples
-
Sum Sales by Region and Product:
SUMIFS(#[Sales].[Amount], #[Sales].[Region], "North", #[Sales].[Product], "Widget")Sums the values in the Amount field of the Sales linked records, where the Region is
"North"and the Product is"Widget". -
Sum Expenses by Department and Quarter:
SUMIFS(#[Expenses].[Total], #[Expenses].[Department], "Marketing", #[Expenses].[Quarter], "Q1")Sums the values in the Total field of the Expenses linked records, where the Department is
"Marketing"and the Quarter is"Q1". -
Sum Revenue by Year and Category:
SUMIFS(#[Revenue].[Value], #[Revenue].[Year], 2023, #[Revenue].[Category], "Electronics")Sums the values in the Value field of the Revenue linked records, where the Year is
2023and the Category is"Electronics".
Inputs
| Argument | Data Type | Description |
|---|---|---|
| sum_range | Number / Number Array | The range of numbers to sum. |
| criteria_range1 | String / Number / Boolean Array | The range to apply the first criteria to. Length must match the length of the range. |
| criteria1 | Number / Expression / String | The first criteria to apply. |
| [criteria_range2] | String / Number / Boolean Array | (Optional) Additional range to apply the second criteria to. Length must match the length of the range. |
| [criteria2] | Number / Expression / String | (Optional) The second criteria to apply. |
Returns
Type: Number
- Produces the sum of numbers that meet the specified criteria.