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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error in Expression :(

Hi I am checking the following condition in my expression.

vFromDate and vToDate are my two variables and I am checking the following condition :

  1. 1. if ELIG_EFF_DT between vFromDate and vToDate
  2. 2. ELIG_TERM_DT between vFromDate and vToDate

  1. 3. VFromDate between ELIG_EFF_DT and ELIG_TERM_DT
  2. 4. And vToDate between ELIG_EFF_DT and ELIG_TERM_DT

bug.jpg

The  1,2 conditions are wrkn properly but getting an error in 3,4.

Is the syntax correct??

Message was edited by: Poornima Narayanan Attached the QVW

12 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Yes it will solve.

Edit:

Sorry I misunderstood the conditions. Please try with this

If(ValueList('Male','Female','Unknown') = 'Male',

(COUNT({  <ELIG_GENDR_CD = {'M'},ELIG_EFF_DT = {">=$(=Date(vFromDate))<=$(=Date(vToDate))"} ,ELIG_AGE={'>=18'}>

  + <ELIG_GENDR_CD = {'M'},ELIG_TERM_DT = {">=$(=Date(vFromDate))<=$(=Date(vToDate))"} ,ELIG_AGE={'>=18'}>

   +<ELIG_GENDR_CD = {'M'},ELIG_EFF_DT = {">=$(=Date(vFromDate))"},ELIG_TERM_DT = {"<=$(=Date(vFromDate))"} ,ELIG_AGE={'>=18'}>

     +

<ELIG_GENDR_CD = {'M'},ELIG_EFF_DT = {">=$(=Date(vToDate))"},ELIG_TERM_DT = {"<=$(=Date(vToDate))"} ,ELIG_AGE={'>=18'}>

}

   DISTINCT ELIG_PERSON_KEY))

)

Not applicable
Author

This is what i have to check tresesco :

Condition #

Condition

1

EFF_DT between FROM_DT and TO_DT

2

TERM_DT between FROM_DT and TO_DT

3

FROM_DT between EFF_DT and TERM_DT

4

TO_DT between EFF_DT and TERM_DT

FROM_DT

TO_DT

EFF_DT

TERM_DT

To be Selected?

1/1/2013

12/31/2013

1/21/2013

1/21/2014

Yes

1/1/2013

12/31/2013

12/12/2012

12/12/2013

Yes

1/1/2013

12/31/2013

12/12/2012

12/12/2014

Yes

1/1/2013

12/31/2013

1/21/2013

6/21/2013

Yes

1/1/2013

12/31/2013

1/1/2012

12/31/2012

No

1/1/2013

12/31/2013

1/1/2014

6/30/2014

No

Anonymous
Not applicable
Author

I think you should make a calendar consisting FROM_DT and TO_DT and join it with your base table,

Now you can easily compare all dates with eachother.