反馈已提交

网络繁忙

You are viewing 5.1 help doc. More details are displayed in the latest help doc.

Calculate the annual year-on-year cumulative amount

  • Recent Updates: April 08, 2022
  • 1. Overview

    1.1 Expected effect

    1.png

    1.2 Implementation ideas

    Use the quick calculation functions ACC_SUM-cumulative and SAME_PERIOD-same period to calculate the accumulated amount of the current year and the accumulated amount of the same period last year;

    Since it is necessary to aggregate the cumulative amount annually and calculate the cumulative monthly amount in the same year at the same time, it is necessary to drag in the "SIGNDATE" grouped by "Year" and "SIGNDATE" grouped by "Year Month" at the same time.

    2. Operation steps

    Sample data: "SalesDEMO>FRDemo_ORDERS".

    2.1 Create component

    Select "FRDemo_ORDERS" under "Data Preparation", and create a component, as shown in the figure below:

    2.png

    2.2 Calculate the monthly cumulative amount of the current year

    Click "+" to create the calculation indicator, name it and enter the formula: ACC_SUM(SUM_AGG(AMOUNT),1), click "OK", as shown in the figure below:

    3.png

    Note: The functions and fields in the formula box need to be selected by clicking the selection area on the left, and cannot be entered manually.

    Formula description:

    FormulaDescription
    SUM_AGG(AMOUNT)Group summation of the 'AMOUNT" by dimension.
    ACC_SUM(SUM_AGG(AMOUNT),1)Cumulative summation of the 'AMOUNT" by dimension.

    2.3 Calculate the monthly cumulative amount of the same period last year

    Click "+" to create the calculation field, name it and enter the formula: ACC_SUM(SAME_PERIOD(SUM_AGG(AMOUNT),"Y"),1), click "OK", as shown below:

    4.png

    Formula description:

    FormulaDescription
    SAME_PERIOD(SUM_AGG(AMOUNT),"Y")Calculate the group summation of the "AMOUNT" in the same month of last year by dimension.
    ACC_SUM(SAME_PERIOD(SUM_AGG(AMOUNT),"Y"),1)Calculate the accumulative summation of the "AMOUNT" in the same month of last year.

    2.4 Year-on-year calculation

    Add a calculation field, name and enter the formula: cumulative amount of the current year/ cumulative amount of last year, click "OK", as shown in the figure below:

    5.png

    2.5 Create a group table

    Drag the "SIGNDATE" field twice into the dimension column, and then set the grouping basis to "Year" and "Year Month" respectively, as shown in the following figure:

    6.png

    7.png

    Note: The reason for using the "Year" and "SIGNDATE" fields is that when calculating the current year's cumulative amount and last year's cumulative amount, if the calculation is based only on the "year month" basis, the cumulative amount will continue to accumulate data for all years. The result is not to calculate the cumulative value in different years.


    Drag three indicators into the indicator column and select "Group Table", as shown in the figure below:

    8.png

    At the same time, the unnecessary time data can be filtered, as shown in the following figure:

    9.png

    2.6 Effect view

    2.6.1 PC

    See section 1.1 of this article for details.

    2.6.2 Mobile

    10.png


    Attachment List


    Theme: Advanced Data Analyis
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    售前咨询电话

    400-811-8890转1

    在线技术支持

    在线QQ:800049425

    热线电话:400-811-8890转2

    总裁办24H投诉

    热线电话:173-1278-1526

    文 档反 馈

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭