ziadmannan
New Member
- Joined
- May 1, 2014
- Messages
- 3
Hi all,
I'm looking for a way to do a calculation based on price bands where a value needs to be calculated based on several bands:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Transaction Bands[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]10000[/TD]
[TD]0.2[/TD]
[/TR]
[TR]
[TD]20000[/TD]
[TD]0.15[/TD]
[/TR]
[TR]
[TD]50000[/TD]
[TD]0.1[/TD]
[/TR]
[TR]
[TD]1000000000[/TD]
[TD]0.05[/TD]
[/TR]
</tbody>[/TABLE]
Based on the bands above, if the number of transactions is 80000 then the way the total amount needs to be calculated is:
First 10000 are charged at 0.2 = 2000
Between 10000 and 20000 @ 0.15 = 1500
Between 20000 and 50000 @ 0.1 = 3000
Between 50000 and 1000000000 @ 0.05 (applies to 30000) = 150
Total = 6650
Any help would be much appreciated. I tried searching for this but couldn't find anything. I'm probably not searching with the right keywords.
Thanks in advance
Ziad
I'm looking for a way to do a calculation based on price bands where a value needs to be calculated based on several bands:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Transaction Bands[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]10000[/TD]
[TD]0.2[/TD]
[/TR]
[TR]
[TD]20000[/TD]
[TD]0.15[/TD]
[/TR]
[TR]
[TD]50000[/TD]
[TD]0.1[/TD]
[/TR]
[TR]
[TD]1000000000[/TD]
[TD]0.05[/TD]
[/TR]
</tbody>[/TABLE]
Based on the bands above, if the number of transactions is 80000 then the way the total amount needs to be calculated is:
First 10000 are charged at 0.2 = 2000
Between 10000 and 20000 @ 0.15 = 1500
Between 20000 and 50000 @ 0.1 = 3000
Between 50000 and 1000000000 @ 0.05 (applies to 30000) = 150
Total = 6650
Any help would be much appreciated. I tried searching for this but couldn't find anything. I'm probably not searching with the right keywords.
Thanks in advance
Ziad