Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More

If formula issue

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


Alteryx Certified Partner

hi @jonathanzadeh 


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?

Alteryx Certified Partner
Alteryx Certified Partner

Hi @jonathanzadeh 


Charged Hours or Budget Hours are probaly String types. At least one of them.


Check that.



Alteryx Certified Partner
Alteryx Certified Partner



Could you post a screenshot of your Formula Tool configuration?



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

Alteryx Certified Partner

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).


Screenshot 2019-05-14 at 19.27.09.png