COUNT_AGG - Count

  • Last update:January 06, 2025
  • Overview

    COUNT_AGG function is used to perform distinct count (not empty) for the specified dimension (dragged into the analysis area). The calculation field will make dynamic adjustment automatically when you switch the analysis dimension.

    Syntax

    COUNT_AGG(Array)

    Based on the current analysis dimension, this function returns the count of the field. The generated results are listed in a data column. The number of rows in the data column is consistent with that in the current analysis dimension.

    Parameter

    Array

    The parameter must   be a non-aggregate expression.

    Notes

    The function supports one parameter of any type for real-time data.

    Example

    If the dimension field in the horizontal axis is Day, the value returned by the calculation field COUNT_AGG(Sales Volume) is the count of sales for each day.

    If the dimension field in the horizontal axis is Month, the value returned by the calculation field COUNT_AGG(sales) is the count of sales for each month.

    For example, you can calculate the number of contract signings each year in Contract Information. Drag Contract Signing Date into the horizontal axis and set the grouping method to Year, as shown in the following figure.

    image 14.png

    1. Create a calculation field named Contract Quantity, enter COUNT_AGG(Contract ID), and click OK, as shown in the following figure.

    image 15.png

    2. The following figure shows the result.

    image 16.png

    3. You can drag Count into the analysis area directly to get the same result, as shown in the following figure.

    image 17.png

    Further Reading

    Count(Number of Rows) = COUNT_AGG(1). For details, see Count.


    附件列表


    主题: Advanced Data Analysis
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    9s后關閉

    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