EARLIER DAX Function Not recommended

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


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

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.


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: Jan 11, 2021   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

MSDN documentation: https://docs.microsoft.com/en-us/dax/earlier-function-dax

2018-2021 © SQLBI. All rights are reserved. Information coming from MSDN is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

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.


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.


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


This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.


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.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.