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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
anthonyeeles
Contributor II
Contributor II

Cases falling in a certain date range

Hello

Our database stores a history of our cases and what stages they passed through, with start and end dts for each.

So the SQL table has CaseID, Step, StartDt, EndDt.

Each case will have a number of rows (between 1 and 7) each with a different Step. 

The difference between startdt and enddt may be less than one month or many months, depending on the case.

I need to be able to work out, for the first day of each month, how many cases (e..g distinct caseIDs) were "in" each step (i.e the start of the month was >= startdt and < enddt.

Any suggestions? I've tried various combinations of set analysis and if statements, alongside a generic calendar with month dates in, but can't get what I'm looking for.

Thanks

Anthony

Labels (1)
1 Reply
venkatg6759
Creator III
Creator III

=Count({<StartDt={">=$(=StartDt)" ,EndDt={"<=$(=EndDt)"}Distinct caseID)