SQL formulas convert with in the 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 Geeks,
I' ve these SQL formulas and looking to find best tools as well logic inside to convert with in the Alteryx Workflow.
nvl(TBL2_PROD_LN_DESC,TBL2_PROD_LN_DESC) AS ROD_DESC
and also this one
SUM(DECODE(TYPE,'Grocery',TYPE2,0)) QTY
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @stevelogue1980, for the first formula we can use the ISNULL() function within an if statement. If this is satisfied we return TBL2_PROD_LN_DESC2 (I've guessed there was supposed to be a 2 here otherwise the formula wouldn't make sense), otherwise we just return TBL2_PROD_LN_DESC:
For formula 2, that's just another if statement which is all DECODE() is - if TYPE = Grocery then give us TYPE2, else 0. After that, we just use the Summarize tool to aggregate - SUM() this:
Hope this helps! Please do shout up if you have any questions. Workflow also attached.
