Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 9 | |
| 8 |