Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

SET Analysis - How to implement OR condition

Hi - Here is a scenario where I need to perform 4 opetarions in OR condition

1EFF_DT between FROM_DT and  TO_DT
2TERM_DT between FROM_DT and TO_DT
3FROM_DT between EFF_DT and TERM_DT
4TO_DT between EFF_DT and  TERM_DT

COUNT({<MEM_GENDER = {'M'}, MEM_EFF_DT = {">=$(=Date(vFromDate))"}*{"<=$(=Date(vToDate))"},FLAG_ELIG_PERSON_KEY ={1}>}  DISTINCT PERSON_KEY)

Highlighted above has  first condition, I dont know how to implement rest 3 onditions in OR. Can someone pls help me?

1 Reply
MVP & Luminary
MVP & Luminary

Re: SET Analysis - How to implement OR condition

Something like this:

COUNT({<MEM_GENDER = {'M'}, MEM_EFF_DT = {">=$(=Date(vFromDate))<=$(=Date(vToDate))"},FLAG_ELIG_PERSON_KEY ={1}>


<MEM_GENDER = {'M'}, MEM_TERM_DT = {">=$(=Date(vFromDate))<=$(=Date(vToDate))"},FLAG_ELIG_PERSON_KEY ={1}>


<MEM_GENDER = {'M'}, MEM_TERM_DT = {">=$(=Date(vFromDate))"}, MEM_EFF_DT = {"<=$(=Date(vFromDate))"} ,FLAG_ELIG_PERSON_KEY ={1}>


<MEM_GENDER = {'M'}, MEM_TERM_DT = {">=$(=Date(vToDate))"}, MEM_EFF_DT = {"<=$(=Date(vToDate))"} ,FLAG_ELIG_PERSON_KEY ={1}>


talk is cheap, supply exceeds demand