Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |