ACCSUM — Calculating the Cumulative Value

  • Last update:October 09, 2025
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0.4

    Added the ACCSUM function.

    11.0.7

    Adapted the ACCSUM function to the chart module.

    Application Scenario

    Layer-by-layer accumulation: In a group table, the data of each group is cumulatively summed from the first layer to the current layer separately.

    Cross-layer accumulation: In a group table, the data of each group is not cumulatively summed by group, but summed from top to bottom across all groups.

    For example, the following figure shows layer-by-layer accumulation and cross-layer accumulation on the payable amount of different order months in the 2008 and 2009 grouped data (two separate groups).

    应用场景.png

    Function Description

    The ACCSUM function, which supports calculating cumulative values based on different groupings, is added in version 11.0.4.

    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

    ACCSUM(number,range)

    Accumulating data based on different groupings

    Parameter 1

    number

    Range of data to be calculated

    Parameter 2

    range

    Grouping basis for accumulation, which can be empty

    (2) Example

    Cell A2 contains the year; cell B2 contains the month; cell C2 contains the payable amount; Expansion Direction of cells A2 and B2 are both set to Vertical; their parent cells are set to Default.

    ACCSUM(C2,A2): indicates accumulating PAID (payable amount) by year, that is, layer-by-layer accumulation.

    ACCSUM(C2): indicates accumulating all data of PAID, that is, cross-layer accumulation.

    Procedure

    Template Creation

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

    新建报表.png

    Data Preparation

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

    SELECT STRFTIME('%Y',SIGNDATE) AS Year,STRFTIME('%m',SIGNDATE) AS Month,PAID
    FROM ORDERS_old
    WHERE STRFTIME('%Y',SIGNDATE) IN ('2008','2009')

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

    准备数据.png

    Report Design

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

    设计报表.png

    (2) For cell C2, set Format to Currency, select ¤#0.00 from the drop-down list box, and set Data Setting to Summary and Sum, as shown in the following figure.

    设计报表-2.png


    Insertion of the Hierarchical Coordinate Function

    (1) Enter text in cells D1 and E1, insert a formula in cell D1, and insert a formula in cell E1, as shown in the following figure.

    插入层次坐标函数.png

    (2) The following table explains the formulas.

    Formula

    Description

    ACCSUM(C2,A2)

    Indicates accumulating PAID by year, that is, layer-by-layer accumulation.

    ACCSUM(C2)

    Indicates accumulating all data of PAID, that is, cross-layer accumulation.

    Format Setting

    Set Format of cells D2 and E2 to Currency, and select ¤#0.00 from the drop-down list, as shown in the following figure.

    设置格式.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.

    mobile.jpg

    Template Download

    Download the completed template by clicking ACCSUM.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