Jump to content
  • 0

Cannot find why my formula will not verify


CaspioChris

Question

I have an issue with the following formula. This version verifies, but when I use the actual field of Max_Potential _Score for the >=86 and <91, I get an error. Any idea in what is causing this? 

CASE
WHEN [@field:Max_Potential_Score] >=97 THEN '5-STAR POTENTIAL'
ELSE
WHEN [@field:Max_Potential_Score] >=91 AND [@field:Max_Potential_Score] <97 THEN '4-STAR POTENTIAL'
ELSE
WHEN  [@cbParamVirtual9]>=86 AND [@cbParamVirtual9] <91 THEN '3-STAR POTENTIAL'
ELSE
WHEN [@field:Max_Potential_Score] >=73 AND [@field:Max_Potential_Score] <86 THEN '2-STAR POTENTIAL'
ELSE
WHEN [@field:Max_Potential_Score]  >=60 AND [@field:Max_Potential_Score] <73 THEN '1-STAR POTENTIAL'
ELSE
'STOP'

END

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

Hi @CaspioChris

You have multiple ELSEs on your case statement. You will only use ELSE if you want to end the condition. For example:

CASE

WHEN [@field:Age] >= 65 THEN ‘Senior’

WHEN [@field:Age] >= 18 AND [@field:Age] < 65 THEN ‘Adult’

ELSE ‘Minor’

END

For troubleshooting, try inserting the condition 1 by 1 to check which line will cause the error.

Is the field "Max_Potential _Score" a number/integer data type?

 

-Potato

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...