Help IfElse Condition with Slab Pricing

I have a Usage Value of 1,00,000 and I need to Multiple with Pricing .
First 10000 * 0 .08 +
30000 * 0.04 +
Remaining Amount 60000 * 0.01
I Tried creating using Ifelse condition but not working.
Please help here

This should work

ifelse (Usage <= 10000, Usage * .08,
Usage < 40000, 800 + (USage - 10000) * .04,
800 + 12000 + (Usage - 4000) * .01)

1 Like