EARLIER — Getting the Value of the Current Row (Only for DEF Functions)

  • Last update:July 07, 2023
  • Overview

    EARLIER: Get the value of the current row. It is only applicable to DEF, DEF_ADD, and DEF_SUB functions, generally used for inter-row filtering calculations.

    Syntax

    EARLIER (parameter)

    Get the value of the intersection of the current row and the field column of the parameter.

    Parameter

    Field column

    The parameter of EARLIER is a single field and does not support constants.

    Example — Getting Values of Other Rows

    In many cases, you need to get a value of another row, such as calculating the difference between the last date and this date, or calculating the conversion rate from last step to this step.

    Taking conversion rate as an example, we need to get the value of the last row to get the result of division.

    1. Upload the example data: Auto Sales Funnel.xlsx

    Upload the downloaded data to an analysis subject.

    culation indicator to calculate the number of customers of each step.

    3. Rank these steps according to their number of customers. Since these steps have a relationship with each other, the more customers there are, the closer these steps are to the front.

    Formula
    Description

    DEF(COUNTD_AGG(Key Step)+1,[Key Step],[Number of Customer of Each Step > EARLIER(Number of Customer of Each Step)])

    • Specified dimension: Key Step

    • Aggregated indicator calculation: COUNTD_AGG (Key Step) +1

    • Filter condition: Number of Customer of Each Step > EARLIER(Number of Customer of Each Step). It filters all steps with customer numbers greater than the current step customer number.

    Calculate COUNTD_AGG (Key Step) + 1 for steps that have been filtered.

    Drag Rank into Indicators, and check whether the results of Rank are correct.

    4. Calculate the number of customers of the last step.

    Formula
    Description

    SUM_AGG(Number of Customer)

    Calculate the total number of customers.

    DEF(SUM_AGG(Number of Customer),[Key Step],Rank+1=EARLIER(Rank))

    • Specified dimension: Key Step

    • Aggregate indicator calculation: SUM_AGG(Number of Customer)

    • Filter condition: Rank + 1 = EARLIER(Rank)

    The filter condition is Rank=EARLIER(Rank)-1, which filters to the step that is one rank lower than the current row rank, and obtains the sum of the number of customers of that step.

    Drag Number of Customer of Last Step into Indicators to check whether the results are correct.

    5. Calculate the conversion rate with the formula: the number of customers of the last step divides the number of customers of every step.

    6. Drag Conversion Rate into Indicators, and set Numeric Format to Percentage.

    Now the conversion rate analysis has been completed.

    附件列表


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