Alteryx Designer

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.
SOLVED

If then Statement using Dates

Highlighted
7 - Meteor

I am trying to create an if then statement using dates, but I keep getting the error "Malformed IF Statement".

 

Screen Shot 2020-05-15 at 12.01.01 PM.pngScreen Shot 2020-05-15 at 12.02.02 PM.png

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @lynnaberry ,

 

remove the ")" after [Service_Start_Date] in the first line, that means, change
IF [SERVICE_START_DATE]) <=

to 

IF [SERVICE_START_DATE] <=

 

Let me know if it works for you.

 

Best,

 

Roland

Highlighted
8 - Asteroid

Hi,

The way I'm reading the formula, in the first line, you've used a closing parenthesis after "[Service_Start_Date])" there is no opening parenthesis for that.

 

Correct that and let me know if that solves your problems.

 

If this helps, kindly mark it as solution

 

Regards

Benn

Highlighted
7 - Meteor

Thank you for your help Roland! I removed it and now I get this error.

 

Screen Shot 2020-05-15 at 12.20.36 PM.png

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Change [SERVICE_START_DATE] < 01-01-2020 to

[SERVICE_START_DATE] < DateTimeParse('01-01-2020', '%d-%m-%Y')

 

I assume, all other fields are of data type "DATE"?

Highlighted
7 - Meteor

Yes that worked @RolandSchubert ! Thank you very much!

Labels