EARLIER DAX Function Not recommended
Returns the value in the column prior to the specified number of table scans (default is 1).
Syntax
Parameter | Attributes | Description |
---|---|---|
ColumnName |
The column that contains the desired value. |
|
Number | Optional |
The number of table scan. |
Return values
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: Feb 6, 2019 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
MSDN documentation: https://msdn.microsoft.com/en-us/query-bi/dax/earlier-function-dax