Count

  • Last update:  2024-01-23
  • Overview

    Application Scenario

    When using FineBI for data analysis, sometimes you need to count the number of clients, orders, branches, and so on, which are generally not directly recorded as fields in the data. This document introduces how to count the number.

    For example, if you want to count the number of clients in different states, you can use the Count function. Drag the State field into Dimension and the Count field into Indicator respectively, and set the count dependence of the Count field to the Client Name field to obtain the number of clients in different states, as shown in the following figure.

     1.gif

    Function Description

    FineBI provides a Count field to count the number of records in a data table and allows you to change the conditions of count dependence to count the number of records in different dimensions.

    Count (total number of rows) = COUNT_AGG(field)

    Count (dependent on other dimension fields) = COUNTD_AGG(field)

    Notes

    The count function is not available in detail tables.

    For details, see Distinct Count Scenarios, and Group Summary Count.

    Procedure

    Example Data

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

     

    2 (2).png

    Component Creation

    On the component editing page, a Count field will be displayed in the left to-be-analyzed area.

    1. Drag the State field into Dimension and the Count field into Indicator respectively. The Count field is used to count the number of data records in each state, as shown in the following figure.

     3.jpg

    2. Add a calculation indicator field named State Count and enter the formula COUNT_AGG(State), which means counting the State field, as shown in the following figure.

     4.jpg

    5.jpg

    Count Dependence Setting

    The count dependence is set to the total number of rows in the data table by default. You can change the dependence conditions which are consistent with the dimension fields in the data table.

    1. For example, if you set the Count Dependence to the Client Name field, the displayed data is the number of clients in each state, as shown in the following figure.

     6.png

    7.png

    2. At this time, you need to modify the calculation indicator field by changing the formula to COUNTD_AGG(Client Name), which means the distinct count of Client Name, that is, displaying the number of clients in different States, as shown in the following figure.

     8.png

    9.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