EARLIER DAX Function Not recommended

Returns the value in the column prior to the specified number of table scans (default is 1).

Syntax

EARLIER ( <ColumnName> [, <Number>] )
Parameter Attributes Description
ColumnName

The column that contains the desired value.

Number Optional

The number of table scan.

Return values

Scalar A single value of any type.

The current value of row, from ColumnName, at Number of outer evaluation passes.

Remarks

EARLIER succeeds if there is a row context prior to the beginning of the table scan. Otherwise it returns an error.
It is recommended using variable (VAR) saving the value when it is still accessible, before a new row context hides the required row context to access the desired value.

Related articles

Learn more about EARLIER in the following articles:

  • Variables in DAX

    In this article, you learn a new feature in DAX 2015: variables. The 2015 version of the DAX language has many new functions, but none of them is a game changer for the language as variables are. » Read more

  • DAX coding style using variables

    This article shows how variables in DAX can impact the coding style, simplifying a step-by-step approach and improving the readability of your code. » Read more

Related functions

Other related functions are:

Last update: Dec 1, 2018   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

MSDN documentation: https://msdn.microsoft.com/en-us/query-bi/dax/earlier-function-dax

DAX Conventions
Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Deprecated

This parameter is deprecated and its use is not recommended.

Contribute

Want to improve the content of EARLIER? Did you find any issue? Please, report it us!
All submissions will be evaluated for possible updates of the content.