Calculating Horizontal Proportion in Group Tables

  • Last update:  2024-01-29
  • Overview

    Application Scenario

    Sometimes, you may need to calculate the horizontal proportion.

    When using the Group Table to create charts, you may need to calculate the Share of sales volume of Fashion hall in total sales volume and the Share of sales volume of Living Hall in total sales volume.

    For example, in May 2017, the formula for the share of Living Hall is 3614113/(3614113+1840913)*100%=66.25%; the formula for the share of Fashion hall is 1840913/(3614113+1840913)*100%=33.75%.

     开头结尾.png

    Implementation Method

    Copy the Sales Volume indicator field, perform detailed filtering with the condition Shop style In Fixed Value Fashion hall, and add a calculation indicator field.

    Use the same method to calculate the share of the sales volume of Living Hall.

    Procedure

    Component Creation

    Click New Subject and search the Store sales statistics in Public Data, as shown in the following figure.

     1.png

    2.png

    Indicator Copying and Filtering

    1. Go to the component editing page.

     3.png

    2. Copy the Sales field twice and name them Sales volume of Living Hall and Sales volume of Fashion hall respectively, as shown in the following figure.

     4.png

    3. Click the icon 企业微信截图_17034958875941.png of the Sales volume of Living Hall field, select Filter Detail from the drop-down list, set the filter condition to Shop style In Fixed Value Living Hall, and click OK, as shown in the following figure.

     5.png

    6.png

    4. Use the same method to perform detailed filtering for the Sales volume of Fashion hall field.

    Proportion Calculation

    1. Add a calculation indicator field named Share of sales volume of Living Hall in total sales volume, enter the formula: SUM_AGG(Sales volume of Living Hall)/SUM_AGG(Sales Volume), and click OK, as shown in the following figure.

     7.jpg

    2. Use the same method to add a calculation indicator named Share of sales volume of Fashion hall in total sales volume, as shown in the following figure.

     8.jpg

    3. Click the Group Table icon in Chart Type, drag the fields into the analysis area, and set the grouping basis for the Sales Date field to Year-Month, as shown in the following figure.

     9.png

    4. Click the icon 企业微信截图_17034958875941.png of the Share of sales volume of Living Hall in total sales volume field, select Value Format from the drop-down list, and set the format to Percentage. Use the same method to set the format of the Share of sales volume of Fashion hall in total sales volume field to Percentage, as shown in the following figure.

     10.jpg

    Effect Display

    For details, see section "Application Scenario."

     


    附件列表


    主题: Creating a Visual Component
    • 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