This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
consider this data
| Label | Value |
| A | 1 |
| A | 2 |
| B | 3 |
| B | 4 |
| C | 4 |
| C | 5 |
and then compare this calculated columns
Column1 = CALCULATE(SUM('Table'[Value]),ALL('Table'), 'Table'[Label]='Table'[Label])
Column2 =
CALCULATE(
SUM('Table'[Value]),
ALL('Table'),
'Table'[Label]=EARLIER('Table'[Label]) --we iterate over Table[Label] comparing it over the evalulation of the column in the filter context outside of CALCULATE
)
Column3 =
VAR CurrentLabel = 'Table'[Label] -- evaluated in the unmodified row specific context
RETURN
CALCULATE(
SUM('Table'[Value]),
ALL('Table'), --changes filter context to the whole table
'Table'[Label]= CurrentLabel
)
you can use it to change the filter context of a column to one of its previous states
https://dax.guide/earlier/
https://docs.microsoft.com/en-us/dax/earlier-function-dax
Can you please explain me with a real time example?
consider this data
| Label | Value |
| A | 1 |
| A | 2 |
| B | 3 |
| B | 4 |
| C | 4 |
| C | 5 |
and then compare this calculated columns
Column1 = CALCULATE(SUM('Table'[Value]),ALL('Table'), 'Table'[Label]='Table'[Label])
Column2 =
CALCULATE(
SUM('Table'[Value]),
ALL('Table'),
'Table'[Label]=EARLIER('Table'[Label]) --we iterate over Table[Label] comparing it over the evalulation of the column in the filter context outside of CALCULATE
)
Column3 =
VAR CurrentLabel = 'Table'[Label] -- evaluated in the unmodified row specific context
RETURN
CALCULATE(
SUM('Table'[Value]),
ALL('Table'), --changes filter context to the whole table
'Table'[Label]= CurrentLabel
)
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 25 | |
| 21 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 46 | |
| 23 | |
| 18 | |
| 18 |