I am trying to replace all the values in the Savings_Rate field with 0 if the year is >2022 and the type of rate is "Savings_Rate_ABC". I have tried a versions of the below code and I am getting Null values for all years with the Savings_Rate_ABC. Any suggestions?
If ([Savings_Rate_Type]="Savings_Rate_ABC" AND ([Year]>=2022)
)
then 0
else [Savings_Rate]
endif
Hi @stein,
Your formula looks to be working, what data type are you storing the year as?
Kind regards,
Jonathan
Maybe we should as check the field type for " Savings_Rate".
It will be error if it is not numeric field, and try below see it works or not.
If ([Savings_Rate_Type]="Savings_Rate_ABC" AND ([Year]>=2022)
)
then '0'
else [Savings_Rate]
endif
Hi @stein
Your formula seems to be correct, do check on the data type for the fields
IF [Savings_Rate_Type]="Savings_Rate_ABC" AND [Year]>=2022
THEN 0
ELSE [Saving_Rate]
ENDIF