Infinity/Negative/Null Values Displayed as 0

  • Last update:  2022-05-10
  • 1. Overview

    1.1 Expected effect

    Many users now have data tables with various special values, such as negative numbers or calculated ∞. In this case, you can use FineBI to convert the special values to the data you want to render.

    Example 1: Show all ∞ as 0 after division calculation.

    Average Sales = Sales / Customer Service, if the number of customers being divided is 0, the output will be displayed as 0 instead of ∞, as shown in the figure below.

    21.png

    Example 2: Change the null value to 0 and for the percentage of expenses to revenue after the null value is displayed as 0, as shown in the following figure.

    22.png

    Example 3: Display a negative number as 0 and then sum the data columns as shown in the following figure.

    23.png

    1.2 Implementation idea

    Example 1: Use IF function, if the divisor is 0, then output 0 directly, otherwise output the result after division.

    Example 2: Use IF function, if the value is empty, then display 0, otherwise output the result after division.

    Example 3: Use SIGN function, if the data is positive = 1, then output the data, otherwise output 0.

    2. Infinity is displayed as 0

    Example data: Sales.xlsx

    2.1 Upload data

    Upload the sample data to FineBI as shown below.

    24.png

    2.2 Create dashboard

    Select "Dashboard/New Dashboard", set the creation location, and click "OK", create the component and select the "Sales" data table, click "OK", as shown in the following figure.

    25.png

    26.png

    2.3 Add calculation indicator

    Click "+" to add the calculation indicator, name it "Average Sales", enter the calculation formulaIF(SUM_AGG(People)=0,0,SUM_AGG(Sales)/SUM_AGG(People))and click "OK", as shown in the following figure.

    27.png

    Note: The functions and fields in the formula box need to be selected by clicking the selection area on the left, and cannot be entered manually.

    Formula说明
    SUM_AGG(People)Returns People summary values for different products
    IF(SUM_AGG(People)=0,0,SUM_AGG(Sales)/SUM_AGG(People))

    If People as divisor = 0, return 0, otherwise return the calculated average Sales

    2.4 Effect view

    Drag and drop the required fields into the corresponding analysis area, see section 1.1 of this document for details.

    3. Null value is displayed as 0

    Example data: data.xlsx

    3.1 Upload data

    Upload the sample data to FineBI as shown below.

    28.png

    3.2 Create dashboard

    Select "Dashboard/New Dashboard", set the creation location and click "OK", create the component and select the "Data" table, click "OK", as shown in the following figure.

    29.png30.png

    3.3 Add calculation indicator

    Click "+" to add the calculation indicator, name it "outcome percentage", enter the calculation formula IF(SUM_AGG(outcome)=null,0,SUM_AGG(outcome)/SUM_AGG(income)), click "OK", as shown in the figure below.

    31.png

    Note: The functions and fields in the formula box need to be selected by clicking the selection area on the left, and cannot be entered manually.

    FormulaDescription
    SUM_AGG(outcome)Returns the summary value of outcome for different weeks
    IF(SUM_AGG(outcome)=0,0,SUM_AGG(outcome)/SUM_AGG(income))If the outcome summary value is equal to null, return 0, otherwise return the calculated percentage of outcome

    3.4 Effect view

    Drag and drop the required fields into the corresponding analysis area, see section 1.1 of this document for details.

    4. Negative numbers are displayed as 0

    Example data: Profit.xlsx

    4.1 Upload data

    Upload the sample data to FineBI as shown below.

    32.png

    4.2 Create dashboard

    Select "Dashboard/New Dashboard", set the creation location and click "OK", create the component and select the " Profit" data table, click "OK", as shown in the following figure.

    33.png34.png

    4.3 Add calculation indicator

    4.3.1 Display negative numbers as 0

    Click "+" to add the calculation indicator, name it "Negative to 0", enter the calculation formula IF(SIGN(Profit)=1,Profit,0), and click "OK", as shown below.

    35.png

    FormulaDescription
    IF(SIGN(Profit)=1,Profit,0)If the profit data is positive, then output directly, otherwise output 0

    4.3.2 Sum over all positive numbers

    Click "+" to add the calculation indicator, name it "Positive Profit", enter the calculation formulaTOTAL(SUM_AGG(IF(SIGN(Profit)=1,Profit,0)),0,"sum"), and click "OK", as shown in the following figure.

    1605246035305915.png

    Note: The functions and fields in the formula box need to be selected by clicking the selection area on the left, and cannot be entered manually.

    4.4 Effect view

    Drag and drop the required fields into the corresponding analysis area, see section 1.1 of this document for details.

    附件列表


    主题: Advanced Data Analysis
    • 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