Alteryx Designer Desktop Discussions

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

IF,Then, Else statement using Alteryx INDB formula tool with Snowflake datebase

Evoz24
5 - Atom

Hello, I am trying to convert this statement into a working script for Snowflake database using Alteryx INDB formula tool. I have been trying to use a case statement but without success. All help is greatly appreciated!

 

 

IF ([SLS_PRC_LOCL]*[CCY_XCHG_RATE]) = NULL() THEN [SLS_PRC_USD] ELSE ([SLS_PRC_LOCL]*[CCY_XCHG_RATE]) ENDif

 

 

Tried the following:

 

case EXG_RT
When ('SLS_PRC_LOCL'*'CCY_XCHG_RATE') = NULL() THEN 'SLS_PRC_USD'
ELSE ('SLS_PRC_LOCL'*'CCY_XCHG_RATE')

1 REPLY 1
apathetichell
19 - Altair

you need an END statement.

NEW VARIABLE - EXG_RT (IN THE TOP IN FORMULA TOOL

CASE WHEN 'SLS_PR_LOCL'*'CCY_YCHG_RATE' IS NULL THEN 'SLS_PRC_USD'

ELSE 'SLS_PRC_LOCL'*'CCY_XCHG_RATE'

END

 

or something like that. I don't know why'd you'd test if a product IS NULL vs a value IS NULL.

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels