Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Condition on a Column

Avanthi
7 - Meteor

Hello All,

 

I have two columns with rows information coming in as date and text format,  I am trying to apply a case statement, if either of the columns have date information then It should flag that  as Yes, if not with No. 

 

for example design review or code review column have date then it should flag as yes other wise no

 

Below shown is the sample data

 

Avanthi_0-1609870895415.png

 

Thank you

Avanti

3 REPLIES 3
AngelosPachis
16 - Nebula

Hello @Avanthi ,

 

You can create that If statement inside a formula tool. That statement will be:

 

IF REGEX_Match([Design Review], "\d{4}-\d{2}-\d{2}") OR 
REGEX_Match([Code Review], "\d{4}-\d{2}-\d{2}")
THEN "Yes"
ELSE "No"
ENDIF

 

That RegEx match embedded formula goes to each one of the designated fields and checks if the values within them comprise of four digits followed by a dash, followed by two  more digits, followed by a dash followed by two more digits.

 

Essentially if something has the yyyy-mm-dd format.

 

The output looks something like this

 

AngelosPachis_0-1609872849006.png

 

Hope that helps,

 

Regards,

 

Angelos

 

 

fmvizcaino
17 - Castor
17 - Castor

Hi @Avanthi ,

 

There are numerous ways but I've found this the easiest one. To duplicate both fields changing its format to date and verifying its content.

fmvizcaino_0-1609873002158.png

 

Best,

Fernando Vizcaino

 

Avanthi
7 - Meteor

It worked, thank you @AngelosPachis , @fmvizcaino 

Labels