Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Good afternoon,
In Alteryx I would write a formula such as:
IF [PYMT_PAID_AMT]=0 THEN Null() ELSE [PYMT_PAID_DESC] ENDIF
I don't understand how to replicate this in Dataiku, as Dataiku recognizes that same formula as invalid, having "unknown tokens". I tried reading the documentation page, but didn't see anything helpful while scrolling through. Is there anywhere that provides examples/comparison of how to write formulas from Alteryx to Dataiku?
Operating system used: Windows
Hi @FarSideFeb
To use a similar formula " IF Contains([ORDER_STS_DESC],"Cancelled") THEN "Cancelled" ELSE "" ENDIF" in DSS you can write something like :
You don't really need more than 3 processors here since you have the condition and if true and if false e.g Cancelled and "". If you need to perform nested ifs
if(contains(ORDER_STS_DESC, "Cancelled"), "Cancelled", "")
Below is generic example with CHERRY in the Description column, if you want to replace or create a new column you can select output column.
Let me know if that helps
Hi,
DSS formula equivalent would be :
if(PYMT_PAID_AMT == 0, "", PYMT_PAID_DESC)
You can have a look at the documentation here : https://doc.dataiku.com/dss/latest/formula/index.html
Also very useful to when writting a formula to use the "Open Editor" panel in the Prepare recipe which will help with the syntax e.g
Let me know if that helps!
Thank you @AlexT !
I did open up the editor; however, the comments it gave were not helpful. I do have one more formula question.
In Alteryx I have the formula: IF Contains([ORDER_STS_DESC],"Cancelled") THEN "Cancelled" ELSE "" ENDIF
I tried to mimick the formula example you gave above; however, that did not work as the editor only accepts 3 arguments. How would I recrate this if then formula in Dataiku?
Hi @FarSideFeb
To use a similar formula " IF Contains([ORDER_STS_DESC],"Cancelled") THEN "Cancelled" ELSE "" ENDIF" in DSS you can write something like :
You don't really need more than 3 processors here since you have the condition and if true and if false e.g Cancelled and "". If you need to perform nested ifs
if(contains(ORDER_STS_DESC, "Cancelled"), "Cancelled", "")
Below is generic example with CHERRY in the Description column, if you want to replace or create a new column you can select output column.
Let me know if that helps