All Products
Search
Document Center

Quick BI:Cumulative calculation

Last Updated:Apr 18, 2023

The cumulative calculation is used to accumulate the results returned from the database one by one, so that users can intuitively observe the increase process of metrics. This topic describes how to configure cumulative calculation.

Prerequisites

Limits

  • Total and subtotal do not participate in cumulative calculation and cannot coexist with cumulative calculation. That is, if cumulative calculation is selected, total and subtotal will automatically become invalid (displayed as "-").

  • A null value is not included in the cumulative result, does not affect other data results, and its own result is still empty (displayed as "-").

  • The following charts support cumulative values:

    • Line /surface chart: line chart, area chart chart, stacked area chart area chart, percentage stacked area chart, combination chart.

    • Bar charts: column chart, stacked column chart, 100% stacked column chart stacked column chart, circular bar chart, leaderboard, bar chart, stacked bar chart, 100% stacked bar chart stacked bar chart, dynamic bar chart, and waterfall chart.

    • Bubble /Scatter Chart: bubble chart, scatter chart, and facet scatter chart.

    • Table type charts: cross tables and details tables.

    • Pie /ring charts: pie charts, polar area chart charts, radar charts, and rectangle hierarchy chart.

    • Geography charts: colored map, geo bubble chart, heat map, flying line map, and symbol map.

    • Indicator charts: kanban and indicator trend charts.

    • Funnel /conversion relationship charts: funnel chart and comparison funnel chart.

    • Other charts: word cloud.

  • Currently, the following tables are supported: cross tables and details tables.

  • This analysis method is calculated based on the returned result set. Currently, the upper limit of the public cloud is 10000. If the total amount of data returned exceeds 10000, the calculation result may not meet expectations. Please pay attention!

Entry point

  • The cumulative calculation of a cross table supports the cumulative value and the cumulative value in the group. You can follow the steps shown in the figure to configure the cumulative value. image

    • The cumulative value is the cumulative statistical result of all values of the indicator. The indicator values are accumulated from top to bottom.

    • The cumulative value in a group is the cumulative statistical result of all values in the metric group. The metric values are accumulated from top to bottom in the group.

  • Other visualization charts do not support grouping, so the cumulative calculation only supports the cumulative value, which you can configure as shown in the figure.

    Take column chart for example. image

Example

Take the cumulative value as an example.

  1. Log on to the Quick BI Console

  2. Log on to the Quick BI console. In the top navigation bar, click Workspace. In the left-side navigation pane, click Dashboards. On the Dashboards page, click All Items, find the dashboard that you want to manage and click the dashboard name to go to the dashboard editing page.

    image
  3. In the top navigation bar, click Add Chart. Find the imageicon and create a cross table.

  4. On the Fields tab of the Chart Design page, configure the cross table data.

    The target dataset is company_sales_record.

    1. In the Measures list and Dimensions list, find the required fields and double-click or drag them to specific fields.

      • In the Dimensions list, find Area, Province, and City, and double-click or drag them to the Rows area.

      • In the Measures list, find order_amt and double-click or drag it twice to the Columns area.

        Note

        Two order amount fields in the Columns section, one displays the raw data and the other sets the cumulative calculation value.

        If two duplicate fields are added to a measure, the message "Duplicate fields exist in the measure" appears. In this case, you do not need to update the data. You can update the data after the configuration is complete.

    2. Find the second order amount in the column field, click the imageicon on the right, and choose Advanced Calculation-> Cumulative Calculation-> Cumulative Value.

      image
    3. Click Update.

      In this case, the results of all the returned order amounts are accumulated one by one.

      image
      Note

      If you select Cumulative Value in Group, the values are grouped by province, and the results of order amounts in each group are accumulated one by one.

      image