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?
Solved! Go to Solution.
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.
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
Thank you!