I need to create a formula that says if $number_base_stations_c is greater than 1 multiply $number_base_stations_c x $990. Otherwise the field should be $0. I can't seem to get this formula to work. Would love help on this one.
I need to create a formula that says if $number_base_stations_c is greater than 1 multiply $number_base_stations_c x $990. Otherwise the field should be $0. I can't seem to get this formula to work. Would love help on this one.
I expect that you have the value of the computed value in a separate field? What have you tried so far? In any case. You need an extra field that does something like this:
ifElse(greaterThan($testfield_c,1),multiply($testfield_c,99),0)
Thanks so much for the help. I actually missed one piece to add. This works but I only want it to do the math for the stations above 1. So if they have 1 station the answer would be $0. If they have 2 stations the answer would be $990, 3 stations would be $$1,980. Not sure if that makes sense?
Hi, I figured out a workaround, Thanks for your help.
Ah, actually its easy. In the formula you need to substract 1 from the value in 'testfield_c' before you multiply.
so the formula would be something like:
ifElse(greaterThan($testfield_c,1),multiply(subtract($testfield_c,1),99),0)
in this case if the testfield = 1 it returns 0
in any other case the 'station' has 1 substracted and multiplied with 99.
Ah, actually its easy. In the formula you need to substract 1 from the value in 'testfield_c' before you multiply.
so the formula would be something like:
ifElse(greaterThan($testfield_c,1),multiply(subtract($testfield_c,1),99),0)
in this case if the testfield = 1 it returns 0
in any other case the 'station' has 1 substracted and multiplied with 99.