I keep getting an error for the below formula. "The error is "invalid type in operator >." Both of my variable items are in double data type. Can't get what is wrong. Thanks for the help guys
IF [Charged Hours] > 0 THEN "Keep" ELSEIF [Budget Hours]>0 THEN "Keep" ELSE "Filter" ENDIF
Solved! Go to Solution.
Are you 100% sure that [Charged Hours] and [Budget Hours] are numeric fields, and that the field you are creating or editing in the formula tool is a string field?
Charged Hours or Budget Hours are probaly String types. At least one of them.
Check that.
Cheers,
I posted the screenshot
I found the issue and you guys pushing me about the data type pushed me to figure it out. I was using the join tool to change it to a double, then i used a union tool. For some reason after the union tool the data type changed back to a string. I used the select tool to fix the issue. Thanks guys
Interesting. My assumption is that you had another version of the same field in the union which had a String field type and during the union that fields value was applied.
This is actually an interesting behaviour of the Union tool which I hadn't ever thought about. I did some testing to show that a numeric value being unioned to a string results in the both values becoming strings (regardless of the input or output order).