Hi community,
I am putting together a formula to add some categories to some data.
I have a dataset containing the price in $ of some transactions. If the value is over, between or under certain values, then a category is returned.
I am using the below, and I am getting "Invalid type in operator <"
if [US m adj] > 500 THEN "Over 500"
elseif [US m adj] < 500 && [US m adj] > 100 THEN "100-500"
elseif [US m adj] < 100 && [US m adj] > 50 THEN "50-100"
elseif [US m adj] < 50 && [US m adj] >10 THEN "10-50"
else "less than 10"
ENDIF
Any suggestions on how I am getting this wrong?
Best
DoC
Solved! Go to Solution.
"I have a dataset containing the price in $ of some transactions"
This probably means your numbers are in a String format. You should convert to Double or Fixed Decimal type and get rid of the dollar sign before doing number comparisons.
Cheers,
@Thableaus
Brilliant. First rate solution.