Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can I do this with SET analys?

Hi

I have YearMonth, StartDate and EndDate. What I want is to count a field with ID that have StartDate up to the month selected and Enddate = Today().

The second picture in the middel desribe what I want and the first what I now get when I select the YearMonth field. (But the EndDate are manually marked at both picts, will just use Today() as expression in the set) 

I tried this =Count({$<StartDate={">0"},EndDate={'$(=Today())'}>}INSATSID)  but I need it to cut after the month selected so it dont count StartDate in ex 2012 in this example.

QV Set.JPG

1 Reply
swuehl
MVP
MVP

Try something like this:

=Count({$<StartDate={"<$(=monthend(makedate(left(YEARMONTH,4),right(YEARMONTH,2)))"},EndDate={'$(=Today())'}>}INSATSID)

makedate(..) could be replaced by YEARMONTH, if YEARMONTH is of type date.