Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I guys, i have a table lake this
| Data | value | index |
| x | 10 | 1 |
| x | 30 | 2 |
| x | 60 | 3 |
i want create another column with this logic
| data | value | index | calculate | result |
| 10 | 1 | 10 | 10 | |
| 30 | 2 | 10+30=40 | 40 | |
| 60 | 3 | 40+60=100 | 100 | |
| 20 | 4 | 100+20=120 | 120 |
i try this solution and works for power bi desktop
CALCULATE(SUM('Table3'[Value]),FILTER('Table3','Table3'[index]<=EARLIER('Table3'[index])))
but when i create on web version of power by the earlier function give me 'dax earlier parameter is not the correct type'
Reading online i understood that earlier shouldn't be used in this situation, but i can't transform my dax expression to make it work differently, could you give me some advice?
Solved! Go to Solution.
@jc173 Nope. Previous Value (“Recursion”) in DAX - Microsoft Fabric Community
Hi @lbendlin ,
I modified my formula, you can try calculated column or measure like below:
Measure =
var cur = MAX('Table'[index])
return
SUMX(FILTER(ALL('Table'),'Table'[index] <= cur),'Table'[value])Column =
var cur = 'Table'[index]
return
SUMX (
FILTER ( 'Table', 'Table'[index] <= cur ),
'Table'[value]
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @lbendlin ,
I modified my formula, you can try calculated column or measure like below:
Measure =
var cur = MAX('Table'[index])
return
SUMX(FILTER(ALL('Table'),'Table'[index] <= cur),'Table'[value])Column =
var cur = 'Table'[index]
return
SUMX (
FILTER ( 'Table', 'Table'[index] <= cur ),
'Table'[value]
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @jc173 ,
You can try formula like below:
Column =
SUMX (
FILTER ( 'Table', 'Table'[index] <= EARLIER ( 'Table'[index] ) ),
'Table'[value]
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
stop it with the EARLIER already, that is not good advice.
This is a running total that can be covered via quick measures.
@jc173 Nope. Previous Value (“Recursion”) in DAX - Microsoft Fabric Community
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.