Combine more conditions in one node. Preferable: Expression node

Hi,

I would like to combine more conditions in Expression node.

My case: If column “Region” does not equal to “EMEA” and column “City” equal to IR or GP or PF then enter 100% in column “Planning”, otherwise do not modify column “Planning”.

Thanks for your support

Krisz

It would be easier for someone to help you if you could supply some sample data.

1 Like

Hi,

I highly recommend to use K-AI when you are working with the expression nodes.
To solve your problem I just copied “If column “Region” does not equal to “EMEA” and column “City” equal to IR or GP or PF then enter 100% in column “Planning”, otherwise do not modify column “Planning”.”
into the K-AI prompt and the magic happened:
”if($[“Region”] != “EMEA” and ($[“City”] == “IR” or $[“City”] == “GP” or $[“City”] == “PF”), “100%”, $[“Planning”])”

1 Like

Hi, Many thanks for your help. It works finally. Interestingly, when I just copied the prompt it did not work. I tried to re-write, but did not work. When I started to type from scratch it was accepted.

Hi @KrisztianKovacs , I suspect that when copying and pasting it had the wrong double quotes as they are likely converted by the forum software. Glad you got it working.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.