Recall & Review
beginner
What does the EARLIER function do in Power BI DAX?
EARLIER allows you to access the value of a column from an outer row context when you are inside a nested row context, like in calculated columns with filters or iterators.
Click to reveal answer
beginner
Why do we need EARLIER in calculated columns?
Because calculated columns often create nested row contexts, EARLIER helps refer back to the original row's value to compare or calculate based on it.
Click to reveal answer
intermediate
In the expression: <br>
COUNTROWS(FILTER(Table, Table[Category] = EARLIER(Table[Category])))<br>What is EARLIER doing?EARLIER is getting the current row's Category value from the outer row context to compare inside the FILTER function's row context.
Click to reveal answer
advanced
How many nested row contexts can EARLIER handle?
EARLIER can handle multiple nested row contexts by specifying a second argument: EARLIER(column, 2) refers to the value two levels up in row context nesting.
Click to reveal answer
beginner
What is a simple real-life analogy for EARLIER in DAX?
Imagine you are looking at a family tree and want to compare a grandchild's data with their grandparent's data. EARLIER lets you 'go back' to the grandparent's info while you are focused on the grandchild.
Click to reveal answer
What problem does EARLIER solve in DAX calculated columns?
✗ Incorrect
EARLIER is used to access values from an outer row context when inside a nested row context, especially in calculated columns.
In which DAX function is EARLIER commonly used?
✗ Incorrect
EARLIER is often used inside FILTER to compare the current row with other rows.
What does EARLIER(Table[Column], 2) mean?
✗ Incorrect
The second argument in EARLIER specifies how many row contexts to go back.
If you do not use EARLIER inside nested row contexts, what happens?
✗ Incorrect
Without EARLIER, you lose access to the outer row context value inside nested contexts.
Which of these is a correct use of EARLIER?
✗ Incorrect
EARLIER is used to compare the current row's value with other rows, such as counting rows with the same category.
Explain in your own words what EARLIER does in DAX and why it is useful in calculated columns.
Think about how you can 'go back' to a previous row's value when inside a filter.
You got /4 concepts.
Describe a simple example scenario where you would use EARLIER to solve a problem in Power BI.
Imagine you want to count how many products share the same category as the current product.
You got /4 concepts.