0
0
Power BIbi_tool~5 mins

EARLIER for row context in Power BI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AAccessing a value from an outer row context inside a nested row context
BCreating new tables from existing data
CChanging data types of columns
DSorting data alphabetically
In which DAX function is EARLIER commonly used?
AMAX
BSUM
CCONCATENATE
DFILTER
What does EARLIER(Table[Column], 2) mean?
AGet the value from the second row of the table
BGet the second character of the column value
CGet the value two levels up in nested row contexts
DGet the value from the second column
If you do not use EARLIER inside nested row contexts, what happens?
AYou cannot refer to the outer row's value, causing errors or wrong results
BThe calculation runs faster
CThe data refreshes automatically
DThe table gets sorted
Which of these is a correct use of EARLIER?
ASorting a column alphabetically
BCalculating a count of rows with the same category as the current row
CCreating a new table from scratch
DChanging the data type of a column
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.