Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Multi-Row formula malformed function call

alexg1
8 - Asteroid

Hello all,

 

I've been trying to apply some conditional logic to some records to update a preexisting 1/0 true/false field. I've written the following expression:

 

IF findstring([DEPART/ARRIVE],substring([DEPART/ARRIVE],1,6)=substring([Row-1:DEPART/ARRIVE],1,6)

AND [DATE]=[Row-1:DATE]

AND [Unique Stops] = 1

THEN 0

ELSE [Unique Stops]

ENDIF

 

I get a malformed function call at the 'THEN' clause, but I can't seem to determine why. Any assistance is appreciated.

 

Thank you,

 

Alex

2 REPLIES 2
Thableaus
17 - Castor
17 - Castor

Hi @alexg1 

 

You're missing a parenthesis after the 1st substring function.

 

IF findstring([DEPART/ARRIVE],substring([DEPART/ARRIVE],1,6))=substring([Row-1:DEPART/ARRIVE],1,6)

AND [DATE]=[Row-1:DATE]

AND [Unique Stops] = 1

THEN 0

ELSE [Unique Stops]

ENDIF

 

 

Cheers,

alexg1
8 - Asteroid

Whoops, guess I need to get my eyes checked. Thank you!

Labels