Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Case statement

Hi All,

case when activeusercount is not null and activeusercount > 2 then 'yes' else 'no' end as "More than 2 users in 30 days",


Can someone please help me in writing this if statement. I'm aware case when statement doesn't exist in Qlik and when I write out this statement it gives me an error. Active User Count is a field in my table.


Thanks in advance

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

I don't think you need the "is not null".  If activeusercount > 2 then it must not be null.

if(activeusercount > 2,'yes','no') as [More than 2 users in 30 days],

View solution in original post

7 Replies
m_woolf
Master II
Master II

I don't think you need the "is not null".  If activeusercount > 2 then it must not be null.

if(activeusercount > 2,'yes','no') as [More than 2 users in 30 days],

Not applicable
Author

Thanks for the reply it gives me an error. Capture.PNG

sunny_talwar

I think what m w‌ gave you is needed to be used in the script

Anonymous
Not applicable
Author

what it says Sunny T is correct  , if you want to use in one dimension then


if(Floor(Active.activeusercount)> 2,'yes','no')


Regards.

Not applicable
Author

Yeah it works in the script. Can you guide me towards how to write this statement in Qlik please.


coalesce(statusname,d2.recordedstatus) as status,


Thanks,

Not applicable
Author

They are fields located in different tables

Not applicable
Author

Thanks for all your help.