EARLIER — Getting Value of the Current Row

  • Last update:  2023-07-07
  • 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.

    Attachment List


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

    フィードバック

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

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

    不再提示

    9s后关闭

    反馈已提交

    网络繁忙