cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## how to calculate cumulative value from result of another calculation(divide)

Hi, I need to get  a cumulative column, the culumlative is based on result of another measure use divide:

here is the measure I created and the result:

cal_bur_total_ar_dor =
90*(DIVIDE(
CALCULATE(SUM(tb[total_ar])),
CALCULATE(SUM(tb[rev])))
cal_bur_acc_ar_dor =
CALCULATE(SUMX('tb',[cal_bur_total_ar_dor]),
FILTER(ALLSELECTED('tb'),
'tb'[busy_year_month]<=MAX('tb'[busy_year_month]))
)

cal_bur_total_ar_dor is the correct reslut that used for calculate cumulative value, while cal_bur_acc_ar_dor did not get the result needed

The cumulative measure need to be like this: 0, 16, 79, 160, 212...

do you have any ideas to correct the measure? Thank you.

1 ACCEPTED SOLUTION
Solution Specialist

Hi, try this one

cal_bur_acc_ar_dor =
var year_month = SELECTEDVALUE(busy_year_month)
return
SUMX(CALCULATABLE(SUMMARIZE(busy_year_month),REMOVEFILTER(busy_year_month),[busy_year_monht]<= year_month),cal_bur_total_ar_dor)

2 REPLIES 2
Solution Specialist

Hi, try this one

cal_bur_acc_ar_dor =
var year_month = SELECTEDVALUE(busy_year_month)
return
SUMX(CALCULATABLE(SUMMARIZE(busy_year_month),REMOVEFILTER(busy_year_month),[busy_year_monht]<= year_month),cal_bur_total_ar_dor)

Anonymous
Not applicable

Thank you, solved