Aggregation Concept

  • Last update:  2024-05-23
  • Definition

    Aggregation in Excel

    Pivoting in an Excel pivot table: It refers to transforming a detailed table through aggregation calculations into a more concise result table, where the table structure is adjusted by changing the position of row and column fields.

    1514e8f31c489a730b29c2c1734d0d0.png

    Aggregation in SQL

    For example, to sum up the sales volume of each customer ID in 2020 and retain only the data of customer ID whose total sales volume exceeds $20,000, you can write the SQL statement as follows.

    SELECT Customer ID, SUM (Sales Volume)
    FROM xxx
    WHERE TEAR(Order Date) =2020
    GROUP BY Customer ID HAVING SUM (Sales Volume) >20,000;

    Structurally, this SQL statement includes filtering (WHERE/HAVING), grouping (based on GROUP BY), and finally aggregation (following SELECT).

    Procedurally, this SQL statement embodies an aggregation process from a detailed table to a cross table.

    Aggregation in FineBI

    1. The correlation between aggregation and an Excel pivot table: 

    The pivot table in Excel is actual a kind of aggregation tool. The process of placing data into a pivot table and summarizing information based on certain categories is essentially data aggregation.

    2. Aggregation in a FineBI component: 

    For example, a table recording the sales facts of commodities contains the sales volume of each day. To calculate the total sales volume of each month, you need to group the data by month and then sum up the sales volume of all days. This process is called aggregation.

    3. Advantages and functions: 

    Through aggregation, you can simplify a large amount of complex data and extract overall information in a more understandable and analyzable form to make wiser decisions.

    81c0a01131cc1f0d7c6900fd08af097.png

    Difference Between Aggregation Calculation and LOD Calculation

    24a299c15ec19ce93eeba2a6718f2d1.png

    Direct Aggregation and Aggregation Calculation

    1. Direct aggregation

    Direct aggregation can be used in simple indicators, for example, KPIs, which are based on direct aggregation and describe the business scale.

    2. Aggregation calculation

    Sometimes scale indicators may struggle to unveil the quality underpinning business operations. In this case, aggregation calculations often serve as a supplement, for example, Profit Margin=SUM_AGG(Profit)/SUM_AGG(Sales Volume).

    If direct aggregation is used, for example, you only need to sum up a single value, you can drag and drop the field to the indicator. It will automatically sum up. Generally, aggregate functions will be used in aggregation calculations.

    For details, see Overview of Aggregate Functions.

    FAQ in Aggregate Function Usage in FineBI

    Q: What are the aggregate functions?

    A: For details, see Overview of Aggregate Functions.


    Q: Why aggregate functions can only be used in components?

    A: After you use aggregate functions, the calculation fields can automatically adjust with the switch of analysis dimensions.

    Calculations on the data editing page are performed at the individual row level. You can specify dimensions to perform aggregation calculations on the component editing page.


    Q: What are the differences between SUM_AGG(A/B) and SUM_AGG(A)/SUM_AGG(B)?

    A: The former is to divide first and then sum up, and the latter is to sum up separately to get individual totals first and then divide.

    83e3b2d4ec1ead263d9db8faea183b0.png


    Q: Can aggregate functions be nested outside of other aggregate functions?

    A: No.

    附件列表


    主题: Getting Started
    • 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