SUMIFS — Conditional Summing

  • Last update:September 24, 2025
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0.4

    Added the SUMIFS function.

    11.0.7

    Adapted the SUMIFS function   to the chart module.

    Application Scenario

    The SUM function supports summing arrays or data ranges, but sometimes conditional summing is needed, which means summing data that meets certain conditions.

    For example, you want to sum sales volumes greater than 2000, as shown in the following figure.

    应用场景一.png

    For example, you want to sum payable amounts greater than 2500 in the current year, as shown in the following figure.

    应用场景二.png

    Function Description

    The SUMIFS function is added in version 11.0.4 to implement conditional summing.

    iconNote:
    The hierarchical coordinate function only supports cell calculations and does not support cross-sheet calculations, watermarks, JavaScript references, or default parameter values.

    Function Explanation

    (1) Overview

    Syntax

    SUMIFS(number,boolean)

    Summing data that meets certain conditions

    Parameter 1

    number

    Data range for summing

    Parameter 2

    boolean

    Judgment condition, whose result is true or false. You can use && and || to separate multiple conditions. When this parameter is null, the execution effect of this function is the same as that of the SUM function.

    iconNote:

    Currently, only the following judgment conditions are supported.

    (1) Comparison of numbers, for example, >10
    (2) Comparison of strings, for example, a == "a" 

    (3) Comparison of null values, for example, ==null

    (2) Example

    Example one: Cell A2 contains each salesperson, and cell B2 contains the total sales volume of each salesperson. Enter the formula SUMIFS(B2,B2 > 2000) in cell C2, and set Left Parent Cell to None for cell C2. In this way, the sales volumes greater than 2000 will be summed. For details, see section "Example One."

    Example two: Cell A2 contains each year, cell B2 contains each month, and cell C2 contains the total payable amount of each month. Enter the formula SUMIFS(C2,C2>2500) in cell C3, and set Left Parent Cell to Default (that is, cell A2) for cell C3. In this way, the payable amounts greater than 2500 in the current year will be summed. For details, see section "Example Two."

    iconNote:
    Set Left Parent Cell for the cell where the formula is located according to the actual situation. Left Parent Cell needs to be set to None for the cell where the formula is located in example one, and be set to Default in example two.

    Example One

    Template Creation

    Create a general report, as shown in the following figure.

    新建报表.png

    Data Preparation

    Create a database query ds1 with the SQL query statement SELECT * FROM Sales_Volume to extract all data from the Sales_Volume table, as shown in the following figure.

    数据准备一.png

    Report Design

    (1) Enter text in cells A1 and B1 and drag the corresponding data columns to cells A2 and B2, as shown in the following figure.

    设计报表一1.png

    (2) Select Summary and Sum in Data Setting for cell B2, as shown in the following figure.

    设计报表一2.png

    (3) Enter text in cell C1, insert the formula SUMIFS(B2,B2 > 2000) in cell C2, and set Left Parent Cell to None for cell C2, as shown in the following figure.

    设计报表一3.png

    Effect Display

    (1) PC

    Save the report and click Pagination Preview. The following figure shows the preview effect.

    PC一.png

    (2) Mobile terminal

    The preview effects on the DataAnalyst app and the HTML5 terminal are the same, as shown in the following figure.

    手机端一.jpg

    Example Two

    Template Creation

    Create a general report, as shown in the following figure.

    新建报表.png

    Data Preparation

    Create a database query ds1, and enter the following SQL statement:

    SELECT STRFTIME('%Y',SIGNDATE) AS Year,STRFTIME('%m',SIGNDATE) AS Month,PAIDFROM ORDERS_oldWHERE STRFTIME('%Y',SIGNDATE) IN ('2008','2009')

    This indicates filtering the year 2008 or 2009 (extracting the year part from the SIGNDATE field, and naming it Year), month (extracting the month part from the SIGNDATE field, and naming it Month), and payable amount (the PAID field) from the ORDERS_old table, as shown in the following figure.

    数据准备二.png

    Report Design

    (1) Enter text in cells A1 to C1, merge cells A2 and A3, and drag the corresponding data columns to cells A2 to C2, as shown in the following figure.

    设计报表二1.png

    (2) Select Summary and Sum in Data Setting for cell C2, as shown in the following figure.

    设计报表二2.png

    (3) Enter text in cell B3, insert the hierarchical coordinate formula SUMIFS(C2,C2>2500) in cell C3, and set Left Parent Cell to Default (that is, cell A2) for cell C3. In this way, the payable amounts greater than 2500 in the current year will be summed, as shown in the following figure.

    设计报表二3.png

    Effect Display

    (1) PC

    Save the report and click Pagination Preview. The following figure shows the preview effect.

    PC二.png

    (2) Mobile terminal

    The preview effects on the DataAnalyst app and the HTML5 terminal are the same, as shown in the following figure.

    手机端二.jpg

    Template Download

    Download the completed template of example one by clicking SUMIFS Example One.cpt.

    Download the completed template of example two by clicking SUMIFS Example Two.cpt.

    Attachment List


    Theme: Report Features
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy