Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 30 | |
| 26 | |
| 17 | |
| 11 | |
| 10 |