Formula function in Alteryx
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi!! Can someone please help me alter this formula. I keep getting 'malformed IF statement' when I input this formula into a large WF: 'IF [Value] > ABS(580000) THEN "Tested XXX" ELSE Null() ENDIF
Solved! Go to Solution.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
It could be that the data type of [value] is not numeric and therefore cannot be compared to a numeric value. It would be helpful if you can share a screenshot of the errors you're getting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi! thanks for reaching out the error is 'Parse Error at char (12) : Invalid type in operator >. (Expression #1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@jlaurenn11 - Can you try adding in a Select tool before the Formula tool and updating your [Value] field to Double or Integer (whichever numeric data type that field is)? Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I went ahead and added the 'Select' tool to then make 'value' an Integer but now I have an error warning on my 'Cross Tab' function saying 'The crosstab was set up for a Numeric field type and String field was found.' Could you please help me with this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I wish I had a technical answer for why you're seeing this error but all I have is that some tools seem to be 'sticky'. In other words, they seem to remember the previous configuration of the data received from the upstream workflow. This is common with the transform tools.
I hate to say the equivalent of "turn it off and back on" but you could delete the cross tab tool and replace it with a new one, reconfigure it the same way (with value as a new datatype), and it shouldn't have a problem.
Remember that these are workflows. If you change something upstream (like a datatype of an existing field or removing a field altogether) it will impact everything downstream.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you so much, reconfiguring the tool worked and now it is running smoothly !
