Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

IF formula

AhmedKarim
5 - Atom

Hi all.

 

I am looking to create an IF formula so that if a column contains any value another column in the same data will be replaced with that data.

 

IF !IsEmpty([Product ID]) THEN [Order]=[Product ID] ELSE [Order]=[Order] ENDIF

 

The above is what I had written which gives me a -1 or 1 in the 'Order' Column. Bu that is not what I want to see. What I want to see in the Order Column is the actual value that  is in the Product ID column if there is one....please could someone advise?

 

3 REPLIES 3
Emil_Kos
17 - Castor
17 - Castor

Hi @AhmedKarim,

 

Please try:

 

IF !IsEmpty([Product ID]) THEN [Product ID] ELSE [Order] ENDIF

 

to give you more context your previous formula checked If the product id wasn’t empty. If it wasn’t it checked If order id equals product. 

In case product column was empty it checked If order column was equal to order column.

 

That is why the output of your formula was boolean data type.

 

 

ArtApa
Alteryx
Alteryx

Hi @AhmedKarim - I recommend you to visit our Academy and watch Interactive Lessons. Here is the one that is focused on writing conditional statements: https://community.alteryx.com/t5/Interactive-Lessons/Writing-Conditional-Statements/ta-p/98910 

AhmedKarim
5 - Atom

Thank you! 

Labels