Forum Discussion
rrathod
5 years agoFrequent Visitor
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 ...
- 5 years ago
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
ryan_mayu
5 years agoSuper User
what's your percentage groups? 10%,8%,7%,6%, what are the rests? What if the monthly sales amount is very huge?
e.g 400,000 which can be separated to twenty 20,000?
rrathod
5 years agoFrequent Visitor
ryan_mayu Actually we are going to group the monthly sales some based on products and we are sure that product sales sum for monmth will not cross 100,000. Maximum lit is 100K
- 0 - 20k: 15%
- 20 - 40k: 14%
- 40-60k: 13%
- 60-80k: 12%
- 80-100k: 11%
- ryan_mayu5 years agoSuper User
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