Skip to main content

Hello,

I am preparing an automation sheet on studio and I need a KPI like,

 

if a user type is not selected calculate ratio as activities done by "B,C,S" type user divided by all activities

But if a user type is selected calculate ratio as activities done by user which selected user type divided by AGAIN all activities.

 

So, If I use simple dropdown it filters all activities and my numerator is also filtered with my denominator but I don't want this.

furthermore, I tried to use dropdown button and write selection to a variable. So I could control KPI formula and I could calculate however I want but, I cant choose how to control if a user type is selected or not. I am trying to control is variable NULL or not. is My way wrong ? I can do it neither on code either nor visual editor. Here is a SS to explain myself.

 

Any help will be appretiated.

Best Regards.

 

To check if a variable has the value of NULL you can use the function IS NULL. The opposite is done with IS NOT NULL

You can also find it in the documentation.

 

Example from the doc:

CASE

WHEN "Table1"."Column1" IS NULL THEN 0

ELSE "Table1"."Column2"

END


Reply