Skip to main content
cancel
Showing results for 
Search instead 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

Reply
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
HoangHugo
Solution Specialist
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)

 

View solution in original post

2 REPLIES 2
HoangHugo
Solution Specialist
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

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors