I am trying to write a formula that would calculate a discounted cost depending on the date.
Any costs that accrue after May 2019 would have a discount rate of 7% and anything prior to that would be 6%.
This is what I have for the formula but it's saying the syntax is incorrect. Any help would be much appreciated.
ifelse(month >= 5 AND year >= 2019), then {unblended_cost} - ({unblended_cost} * 0.07), else {unblended_cost} - ({unblended_cost} * 0.06)) 1 Answer
Try the following and let me know if you encounter other errors
ifelse( month >= 5 AND year >= 2019, {unblended_cost} - ({unblended_cost} * 0.07), {unblended_cost} - ({unblended_cost} * 0.06)
) Essentially ifelse can be thought of as a single function, and the then and else keywords are extraneous.