We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

If function error

FECL3
8 - Asteroid

I am returned the error "Parse error at char (11)" and am unsure what it means and how I resolve it?

 

The formula used is IF [Earned]=<[Duration] THEN ([Earned]*([Earned]+1))/2 ELSE (365*(365+1)/2 ENDIF

 

All variables are in double format.

 

The formula is trying to calculate the triangular number sequence based on n = earned up until a limit of 365 (total number of days in the year). At which point the output should always be 365*(365+1)/2 = 66795

5 REPLIES 5
Emil_Kos
17 - Castor
17 - Castor

Hi @FECL3,

 

At first glance it looks like you need to make just a small change in your formula:

 

 IF [Earned]=<[Duration] THEN ([Earned]*([Earned]+1))/2 ELSE (365*(365+1)/2 ENDIF

 

It should be

 

 IF [Earned]<=[Duration] THEN ([Earned]*([Earned]+1))/2 ELSE (365*(365+1)/2 ENDIF

Billigans
8 - Asteroid

The error message is telling you that something is wrong at the 11th character in your string. In your case, it doesn't understand the "=<" part. Try flipping them around, like below. That should fix that error, at least. 

 

IF [Earned]<=[Duration] THEN ([Earned]*([Earned]+1))/2 ELSE (365*(365+1)/2 ENDIF

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @FECL3 

 

Change the formula to below

 

IF [Earned]<=[Duration] THEN ([Earned]*([Earned]+1))/2 ELSE (365*(365+1)/2 ENDIF

 

Hope this helps : ) 

Billigans
8 - Asteroid

Hello Friend, if you found the answers to your question helpful, be sure to accept them as a solution. Happy Solving!

grazitti_sapna
17 - Castor

Hi @FECL3 , there is a minor mistake in your formula,

IF [Earned]=<[Duration] THEN ([Earned]*([Earned]+1))/2 ELSE (365*(365+1)/2 ENDIF

 

Replace the formula with,

IF [Earned]<=[Duration] THEN ([Earned]*([Earned]+1))/2 ELSE (365*(365+1)/2 ENDIF

 

If this works, kindly mark it as a solution if this solves your purpose.

 

Thanks.

Sapna Gupta
Labels
Top Solution Authors