Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
iluilyas
Contributor III
Contributor III

Set Analysis - And and Or conditions

Dear Members

I'm very new to Qliksense and using Qliksense 3.0 desktop version to incorporate below SQL condition.

"SELECT COUNT(1) FROM EMP_MASTR WHERE DATE_OF_JOING <= '31-JUL-2015'

AND (QUIT_DATE IS NULL OR QUIT_DATE >= '31-JUL-2015')"

Below is the snippet of my set analysis condition. But it's not returning the right values. Its returning  as "-"

Importantly, I have a feeling that I'm not getting the QUIT_DATE records that are NULL.

Your help is very much appreciated.

Regards

Ilyas

11 Replies
iluilyas
Contributor III
Contributor III
Author

Thanks Vineeth. This combination gave "-" as a result. Even I have tried Isnull earlier but in vain

sunny_talwar

I am using a concept of search string within set analysis. You can find more information about that here ->A Primer on Set Analysis

Basically, the idea is that if you create a table with EMPID as dimension and as your expression it will be evaluated as 0 or -1. So based on this any place which gets assigned a -1 will be included in your expression's final result.

Count({<EMPID = {" =QUIT_DATE >= MakeDate(2015, 7, 31) or Len(Trim(QUIT_DATE)) = 0"}>} EMPID)