Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Forumla issue Malformed function call i statement ABC

Pascal_R
8 - Asteroid

Hi,

 

Somewhere in the bold there is an issue. I tray to evaluate the days difference between the current date and the creation date of an Material. If it is over 180 the ABC status is "W" but somehow its not working.

 

Error = Malformed function call.

 

IF [ECO #]>0 THEN "Z" ELSEIF [St]=32 and 34 THEN "STATUS 32/34" ELSEIF DateTimeDiff(datetimetoday(),[Created],) <180 THEN "W" ELSE "" ENDIF

 

Thank you for any inputs.

Regards,

Pascal

6 REPLIES 6
Emil_Kos
17 - Castor
17 - Castor

Hi @Pascal_R,

 

I think error is actually here [St]=32 and 34 maybe you want to write [St]=32 OR [St]=34

 

Pascal_R
8 - Asteroid

@Emil_Kos 

 

Please see attached screenshot, still have the same issue,

 

Regards,

Pascal

Emil_Kos
17 - Castor
17 - Castor

Hi @Pascal_R,

 

You have missed unit in date time diff function.

 

IF [ECO #]>0 THEN "Z" ELSEIF [St]=32 OR [St]=34 THEN "STATUS 32/34" ELSEIF DateTimeDiff(datetimetoday(),[Created],'days') <180 THEN "W" ELSE "" ENDIF

Pascal_R
8 - Asteroid

@Emil_Kos 

 

please see attached now it says: invalid type in operator

Emil_Kos
17 - Castor
17 - Castor

Hi,

 

Please paste my formula it is working for me:

 

IF [ECO #]>0 THEN "Z" ELSEIF [St]=32 OR [St]=34 THEN "STATUS 32/34" ELSEIF DateTimeDiff(datetimetoday(),[Created],'days') <180 THEN "W" ELSE "" ENDIF

 

 

 

vizAlter
12 - Quasar

Hi @Pascal_R — Try to write like this:

 

Assuming your [ECO #], [St] are numeric and the newly created formula (as below) has string (V_WString) datatype:

IF [ECO #] > 0 THEN 
 "Z" 
ELSEIF [St]=32 OR [St] = 34 THEN 
 "Status 32/34" 
ELSEIF DateTimeDiff(DateTimeToday(),[Created],"day") < 180 THEN 
 "W" 
ELSE Null() ENDIF

vizAlter_1-1600778423829.png

 

 

Labels
Top Solution Authors