Does Kintone have a SUMIF function?

Article Number:040784

Although Kintone does not have a SUMIF function, you can use the SUM function in combination with the IF function to sum up values in a table that meet a specified condition.
To sum up values in a table that meet a specified condition, you can use the following method.

Step 1: Use the IF function to extract row values that meet a certain condition.
Step 2: Use the SUM function to sum up the extracted values.
Calculation example 1

The following are some usage examples.

Example: Summing up only the sales amount for a specific store

This example shows how to sum up only the sales amount for the Osaka store from the "Sales by Store" table.

Fields to be placed in the table
Place the following fields in the table.

  • "Drop-down" field
    Field name and field code: "Store"
    Set store names (e.g., Tokyo, Osaka, Fukuoka) as the options.

  • "Number" field
    Field name and field code: "Sales"

  • "Calculated" field
    Field name and field code: "Sales (Osaka)" and "Sales_Osaka" respectively
    Formula: IF(Store="Osaka",Sales,0)

With these field settings configured, the "Sales (Osaka)" column will display the sales amount if the value in the "Store" column is "Osaka", and 0 if not.
As necessary, you can also place other fields, such as a "Date" field, in the table.

Fields to be placed outside the table
Place the following field outside the table. This field will be used for summing up the sales amount for the Osaka store.

  • "Calculated" field
    Field name: "Total Sales (Osaka)"
    Formula: SUM(Sales_Osaka)

Setting the field code is optional.
Configuring the field setting as described above, you can get the total sales amount for the Osaka store.

Calculation example 1

Other usage example

This example uses the "Expense Details" table to show how to separately sum up the values in the row with the "Claim reimbursement" check box selected and the values in the row without the check box selected.
A "Check box" field is used for the "Reimbursement" field.
In this example, all formulas are set for "Calculated" fields.

Calculation example 2
  • Formula for the "Reimbursement Amount" field in the table: IF(CONTAINS(Reimbursement,"Claim reimbursement"),Expense,"")
  • Formula for the "Expense Amount (Excl. reimbursement)" field in the table: IF(CONTAINS(Reimbursement,"Claim reimbursement"),"",Expense)
  • Formula for the "Total Reimbursement Amount" field outside the table: SUM(Reimbursement_Amount)
  • Formula for the "Total Expense Amount (Excl. reimbursement)" field outside the table: SUM(Expense_Amount_Excl_Reimbursement)

If the "Claim reimbursement" check box is selected, the expense is displayed in the "Reimbursement Amount" column. If the check box is not selected, the expense is displayed in the "Expense Amount (Excl. reimbursement)" column.
The sum of the values in the respective columns is displayed in the corresponding fields placed outside the table.

App template

From the link below, you can download an app template with the formulas preconfigured.

App template "kintone_sumif_en.zip"
Click the link to download the template file (zip) and import it into Kintone without unzipping it.