Level-by-Level Average

  • Last update:  2023-11-18
  • Overview

    Application Scenario

    Level-by-level average is obtained by adding up the data from the first level to the current level in each group of group reports.

    For example, as shown in the figure below, the cumulative average values for each month in the first half of 2010 and 2011 are respectively calculated.  

     1.png

    Implementation Method

    You can refer to the implementation method of the level-by-level accumulation.

    Example

    Data Preparation

    Create a general report and create a dataset named ds1. The SQL statement is as follows:

    SELECT STRFTIME('%Y', Order Date) AS Year, STRFTIME('%m', Order Date) AS Month, Amount Due

    FROM Order

    WHERE STRFTIME('%Y',Order Date) >= '2010'

    Report Design

    Design the table as shown in the following figure. Drag the fields in ds1 to cells A3, B3, and C3. Calculate the average for cell E3.

     2.png

    Enter the formula (D3[B3:-1]*(&B3-1)+C3)/&B3 for cell E3. The following table describes the formula.

    Formula
    Description

    D3[B3:-1]

    Represents the value of D3 in the previous cell (last month) expanded from cell B3, namely, the level-by-level average of the previous month.

    &B3-1

    Represents the previous cell corresponding to each value expanded from cell B3.

    D3[B3:-1]*(&B3-1)+C3

    Represents the cumulative total value up to the present within the current year.

    &B3

    Represents the cell corresponding to each value expanded from cell B3.

    (D3[B3:-1]*(&B3-1)+C3)/&B3

    Represents the cumulative average for each month in the current year.

    Effect Preview

    Save the template and click Pagination Preview. The effect is shown in section "Application Scenario."

    The template can be previewed on APP and HTML5 terminals.

    Template Download

    For details, you can click to download Level-by-Level Average.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