I tried
case when (X < Y and X is not null) then 0 else (X > Y and X < Z) then 50 else (X > Z) 100 end
That didn't work (neither did removing the brackets) so I'm thinking either my syntax is bad or this is not possible. Any feedback?
case when X < Y then 0 when (X > Y and X < Z) then 50 else 100 end
Looks like you go straight into a "when" statement after the first value option. Not need for a "then"
And just tie it off with an "else # end"
Thanks for this post. I have done this once or twice before, but I couldn’t remember the syntax.
This post saves me every time I try to set up one of these Advanced Formula fields!
I have similar use case and it does not seem to work if I use two variables. Has anyone tested this - case when x=0, then A case when (x >0 and y <100) then B else 0 end
I have similar use case and it does not seem to work if I use two variables. Has anyone tested this - case when x=0, then A case when (x >0 and y <100) then B else 0 end
Hi
Reply
Sign up
If you ever had a profile with us, there's no need to create another one.
Don't worry if your email address has since changed, or you can't remember your login, just let us know at community@gainsight.com and we'll help you get started from where you left.
Else, please continue with the registration below.
Welcome to the Gainsight Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.