I used
If [Name]=70 or [Name]=75 or [Name]=85
then
1/[Average Rate]
else
[Average Rate]
endif
It shows Invalid type in operator. How to fix it? (Data type is double)
Solved! Go to Solution.
Do you have any Zero or null value in [Average Rate]?
yes, I have 0 for average value. How to fix it?
My guess is that your Name column is likely a string and therefore the values need to have quotes around them.
If [Name]=“70” or [Name]=“75” or [Name]=“85”
If some like this
if [Average Rate] = 0 then 0 else
If [Name]=70 or [Name]=75 or [Name]=85
then
1/[Average Rate]
else
[Average Rate]
endif
endif
Again the new column is numeric, we can only assign numbers.
Hi @gongyunqian622 ,
does it show something like tihs?
This would throw an error like "invalid operator ..."
I think you should double check data types, especially for the name field. If [Name] is a string field, you should replace
If [Name]=70 or [Name]=75 or [Name]=85
by
If [Name]='70' or [Name]= '75' or [Name]= '85'
If [Average Rate] isn't a numeric field, you could use ToNumber([Average Rate]) to convert it to numeric.
Let me know if it works for you.
Best,
Roland