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

Ignoring rows based on multiple conditions using OR statement

azfersaeed
5 - Atom

Hi,

 

I am trying to remove "-0" from the end of URLs in a column BUT want to skip two rows. One contains the string "marketing-transit-map-0" and the other contains "representative-use-cases-0".

 

IF !Contains([landingPagePath],"marketing-transit-map-0") OR
   !Contains([landingPagePath], "representative-use-cases-0")
THEN Trim([landingPagePath],"-0")
ELSE([landingPagePath])
ENDIF

For some reason, however, the "-0" is getting removed from both of these rows.

 

Reason I want to skip those specific rows is because "-0" in those two cases is not an error whereas in other URLs, it is an error.

 

Thanks for your help!

2 REPLIES 2
Hugo
9 - Comet

Hi Azfersaeed,

 

the reason it is getting removed is the that the string "marketing-transit-map-0" triggers the !Contains([landingPagePath], "representative-use-cases-0") clause. Since you have an OR statement, the first condition is true, so it is trimming the URL.

 

If you make the statement an AND statement it should work

 

azfersaeed
5 - Atom

Thanks, it's always the little stuff!

Labels