Calculating Proportion in Group - Dimension

  • Last update:  2024-01-29
  • Overview

    Application Scenario

    Value fields available for direct analysis may not exist in scenarios where you need to calculate the proportion. You may need to count the occurrence of a specific text/date field and analyze its proportion in different categories.

    iconNote:
    For details about the proportion of value fields in different categories, see Calculating Proportion in Group - Indicator.



    For example, you can calculate the ratio of the number of Women's Wear stores in Self-owned stores of each general region to the total number of Self-owned stores. The effect preview is as follows.

     开头.png

    Implementation Method

    Copy the Store Name field twice and convert them into indicator fields which automatically display the number of store names (distinct count), that is, the number of stores.

    Perform detailed filtering to get the data of The Number of Self-owned Women's Wear Stores and The Number of Self-owned Stores.

    Add a calculation indicator to calculate the proportion.

    Procedure

    You can download the example data.Store Sales Data.xlsx

    Creating an Analysis Subject

    Create an analysis subject and upload the data table, as shown in the following figure.

     1.png

    2.png

    Creating a Component

    Create a component in the analysis subject, go to the component editing page, and use the Store Sales Data table in the component, as shown in the following figure.

     3.jpg

    Copying the Field

    To calculate the proportion of The Number of Self-owned Women's Wear Stores and The Number of Self-owned Stores, you need to copy the Store Name field twice and then convert the copied fields into indicator fields (distinct count).

    Click the icon 企业微信截图_17034958875941.png and select Copy from the drop-down list. Perform two Copy operations, and you will get Store Name1 and Store Name2, as shown in the following figure.

     4.png

    Converting Dimension Fields into Indicator Fields

    Click the icon  of Store Name1, select Convert to Indicator from the drop-down list, and repeat the same operation for Store Name2. You may get two indicator fields (distinct count) for the number of stores. 

     5.png

    6.png

    Setting Filter Detail

    Click the icon  of Store Name1, select Rename from the drop-down list and change its name to The Number of Self-owned Stores. Repeat the same operation for Store Name2 to change its name to The Number of Self-owned Women's Wear Stores

     7.png

    8.png

    Adding a Condition in Filter Detail of The Number of Self-owned Stores

    1. Click the icon  and select Filter Detail from the drop-down list, as shown in the following figure.

     9.jpg

    2. Click Add Condition and Please Select Field to select Store Nature from the drop-down list. Set the parameter to Store Nature In Fixed Value Self-owned, and click OK

     10.jpg

    11.png

    3. After successfully adding the condition, click OK, and the effect is shown in the following figure.

     12.png

    Adding a Condition in Filter Detail of The Number of Self-owned Women's Wear Stores

    1. Click Add Condition and Please Select Field to select Store Nature from the drop-down list. Set the parameter to Store Nature In Fixed Value Self-owned. Repeat the same operation to add a second condition. At this time, select the Category field and set the parameter to Category In Fixed Value All Women's Wear-related Stores (7 in total), as shown in the following figure. 

     13.jpg

    2. After adding the condition, click OK. The effect preview is as follows.

     14.png

    Adding a Calculation Indicator

    Use The Number of Self-owned Women's Wear Stores and The Number of Self-owned Stores to calculate the proportion.

    1. Click the icon   to add a calculation indicator, as shown in the following figure.

     15.png

    2. Set the indicator's name to Share of Self-owned Women's Wear Stores in Total Self-owned Stores and enter the formula The Number of Self-owned Women's Wear Stores/The Number of Self-owned Stores in the box. 

     16.png

    Adding a Group Table

    Click the Group Table icon and drag the fields into Dimension and Indicator, as shown in the following figure.

     17.png

    Effect Display

    On PC

    For details, see section "Application Scenario."

    On Mobile Terminals

    The effect preview is as follows.

     18.png

     

    附件列表


    主题: 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