How does the EARLIER function (DAX) work?
The EARLIER function (DAX) returns the current value of the specified column in an outer evaluation pass of the mentioned column.
EARLIER Formula Syntax
How do you use the EARLIER function?
The EARLIER is useful for nested calculations where you want to use a certain value as an input and produce calculations based on that input. In Microsoft Excel, you can do such calculations only within the context of the current row; however, in DAX you can store the value of the input and then make calculation using data from the entire table.
The EARLIER function is mostly used in the context of calculated columns.
Related Blog Posts
Related Support Forum Posts
Considerations when using the EARLIER function
EARLIER succeeds if there is a row context prior to the beginning of the table scan. Otherwise it returns an error.
The performance of EARLIER might be slow because it theoretically, it might have to perform a number of operations that is close to the total number of rows (in the column) times the same number (depending on the syntax of the expression). For example if you have 10 rows in the column, approximately a 100 operations could be required; if you have 100 rows then close to 10,000 operations might be performed.
Related Video Tutorials
Formula examples using the EARLIER function
Related DAX Functions
Related Course Modules
To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.