Jump to content

how to create Scatterplot shape by in combination with Case when and Nest


Nagendra babu

Recommended Posts

Hi all,

I am trying to create a custom expression for shape by in scatterplot, where in I don't want to see blank data when used 2 columns(mainly Column2), the custom expression is as follows:

default: <[Column 1] NEST [Column 2]>

I tried to implement this logic within a case when statement :

<

case 

when [Column2] is null then [Column1]

when [Column2] is not null then [Column1] nest [Column2]

end>

when I try to use nest with case when statement I get an error like:

image.png.d534e417749dfca9ca92b33fd9ef80f9.pnghow should I setup the custom expression to make this work?

Thanks in advance!

Link to comment
Share on other sites

Certain functions are only processed in specific situations and in certain order, which is why you cannot use NEST in case statement. As a possible workaround you could try creating a calculated column using:

case 

when [Column2] is null then [Column1]

else [Column2] end as [NewCol2]

Then in the Expression you can use case 

<[Column1] nest [NewCol2]>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...