Calculation Type Selecting

  • Last update:  2024-05-17
  • Overview

    This document introduces the calculation types you can use in FineBI.

    You can use the following four calculation types when adding a calculation indicator in FineBI:

    1. Aggregation calculation

    2. Detail level calculation (data source row level calculation)

    3. Functions that control the calculation granularity

    4. Component quick calculation

    Aggregation Calculation

    You can download the sample data: Contract Fact.xlsx.

    Generally, to achieve an aggregation calculation, you need to use aggregate functions to summarize the values of a set of data and then use the summarized values to perform a further calculation. For details, see Overview of Aggregate Functions.

    For example, you want to process the data in the contract below.

    1d96aded874de57e1a428d60f6bb905.png

    If you want to have a column to display the count of contract IDs corresponding to each contract type, you can go to the Component editing page, click the ba09d81625c7dada57875294bdbcc4c.png icon, select Add Calculation Indicator from the drop-down list, input the formula: COUNT_AGG(Contract ID), and click OK, as shown in the following figure.

    图片1.png

    The following figure shows the calculated results.

    iconNote:
    The colors help to display the detail level at which the calculations are performed.

    dc6212250b59522de276f4aae3b7033.png

    The following figure shows the table effect on the Component editing page.

    b9fae18de2675bc89bcf6cf115e52fd.png

    Detail Level Calculation

    Row level calculations of data sources can be achieved by adding columns to self-service datasets and adding calculation indicators on the Componenediting page.

    For details of various functions, see Function Calculation Format.

    Dashboard Calculation

    You are not advised to perform a detail level calculation on the Component editing page of a dashboard.

    The application scenario of a detail-level calculation: For example, each order record contains data of the total sales price and the unit one, and you want to use those data to calculate the total purchase quantity. In this case, you can add a calculation indicator, input the formula: Total Sales Price/Unit Price, and add up data of the purchase quantity for each order to get data of the total purchase quantity when summarizing.

    You can use the sample table Contract Fact. You can go to the Component editing page, click the ba09d81625c7dada57875294bdbcc4c.png icon, select Add Calculation Indicator from the drop-down list, name the to-be-added field as Unit Price, input the formula: Contract Amount/Purchase Quantity, and click OK, as shown in the following figure.

    图片2.png

    The following figure shows the calculated results. The calculation is performed on the row level of the data source, thus rows are set to be displayed in various colors for better differentiation.

    37414581b4914688afa9e8aa696bf2b.png

    The results are obtained through division performed on the detailed data.

    Self-Service Dataset Calculation

    For details, see Basic Functions of the Added Column.

    Function that Controls Calculation Granularity

    The results calculated through aggregate functions can be automatically changed according to fields in Dimension.

    However, functions that can control the calculation granularity help when multiple dimensions exist in the analysis area, and at the same time you need to calculate the summary data grouped by certain dimensions.

    Functions of DEF, DEF_ADD, and DEF_SUB can better control the granularity. These functions can be performed at higher granularity levels (inclusive), lower granularity levels (exclusive), or completely independent levels (fixed).

    For example, you want data on the quantity of each product purchased by members on different dates. The dimension field of Date is in the analysis area.

    You can group the table data by the two dimension fields: Product and Date, filter the data in the Membership field based on the grouped data, and perform a summary calculation on the Purchase Quantity field data.

    81a6e976f09f41a94d83aae129471ab.png

    You can go to the Component editing page, click the ba09d81625c7dada57875294bdbcc4c.png icon, select Add Calculation Indicator from the drop-down list, name the to-be-added field as Purchase Quantity of Product by Member, input the formula: DEF_ADD(SUM_AGG(Purchase Quantity),[Product],[Membership='Yes']), and click OK, as shown in the following figure.

    edac04234d9526928a1ea9c49ee29a0.png

    For details, see DEF_ADD (Analysis Area Dimension and Specified Dimension)

    Component Quick Calculation

    Quick Calculation allows you to perform calculations or convert value display formats on data in the created chart/table component.

    For details, see Quick Calculation - Percentage, Quick Calculation - Ranking, Quick Calculation - All Values, Quick Calculation - Cumulative Value, YoY/MoM Growth (Quick Calculation), Summary Functions for Tablesand Summary Functions for Charts.

    Attachment List


    Theme: Advanced Data Analysis
    前の記事
    次の記事
    • いいね
    • 良くない
    • 閲覧しただけ

    フィードバック

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭

    反馈已提交

    网络繁忙