Overview - EARLIER for row context
What is it?
EARLIER is a function in Power BI's DAX language that helps you access a previous row's value when working inside a row context. It allows you to compare or calculate values across rows in a table, especially when creating calculated columns. This function is useful when you want to refer back to an earlier row's data while processing the current row.
Why it matters
Without EARLIER, it would be very hard to perform calculations that depend on comparing or accumulating values across rows in a table. This limits your ability to create meaningful insights like running totals, rankings, or conditional calculations based on previous rows. EARLIER solves this by letting you 'remember' a previous row's value during evaluation.
Where it fits
Before learning EARLIER, you should understand basic DAX concepts like row context, calculated columns, and simple functions. After mastering EARLIER, you can explore more advanced DAX functions like variables, FILTER, and CALCULATE to build complex calculations and measures.