Forum Discussion

rrathod's avatar
rrathod
Frequent Visitor
5 years ago
Solved

Sales sum divide in bucket

Hello Team,   i've monthly sales column and i am trying to calculate some kind of fees from that. Below are some highlights to calculate the same.   so if sum of monthly sales are 50,000 then it ...
  • ryan_mayu's avatar
    ryan_mayu
    5 years ago

    rrathod

    is this what you want?

    Measure = 
    var a=int([monthly amount]/20000)
    return if(a=0,[monthly amount]*0.15,if(a=1,20000*15*+([monthly amount]-20000*a)*0.14,if(a=2,20000*0.15+20000*0.14+([monthly amount]-20000*a)*0.13,if(a=3,20000*0.15+20000*0.14+20000*0.13+([monthly amount]-20000*a)*0.12,20000*0.15+20000*0.14+20000*0.13+20000*0.12+([monthly amount]-20000*a)*0.11))))

    pls see the attachment below