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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing Dates in Set Analysis Problem

Hi ,

i  have a date field eligibility_date  which has a date in 'DD-MM-YYYY' format    my table structure is

itemcodeeligibility_date
e13442 04-05-2012
e492203-04-2012
e423423-05-2012

i want to write an expression  which will return me the count(itemcode)  falling between  a month lets  say 'X' and  count(itemcode) a on month 'X-1' ie .

current expression is

count({<ELIGIBILITY_DATE={">=monthstart(addmonths(ELIGIBILITY_DATE,-1))"}}>}itemcode)

its giving null values .  my  condition is that i want  records for elibility_date and records for elibility_date-1 month .

i also tried count(if(date(ELIGIBILITY_DATE,'DD-MM-YYYY')<=MonthStart(AddMonths(ELIGIBILITY_DATE,-1)),itemcode,0))

but i required a set analysis based expression

Any Solutions ?

Thanks and regards ,

s_tushar.

1 Reply
SunilChauhan
Champion II
Champion II

there is one extra curly brace

use below

count({<ELIGIBILITY_DATE={">=monthstart(addmonths(ELIGIBILITY_DATE,-1))"}>}itemcode)

hope this helps

Sunil Chauhan