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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate inforce members

I have attached an Excel file which shows what I need to do.

The data I have contains list of members and for each member it has a start date and an end date. I want to know at any point in time how many members are inforce or active and how has this evolved over time. The data is shown in the first sheet and on the second sheet it first calculates the active members at mid of each month and then the graph just displays this.

My aim is to get either the table or the graph.

Thanks.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

PFA, Hope this is what you need.

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See this blog post: Creating Reference Dates for Intervals

And the attached example. If you don't really mean 'at any point in time', but are willing to make do with the first days of each month then you can change

Table2:

Load id, Date(START_DT + iterno() -1) as ReferenceDate

resident Table1

While IterNo() <= END_DT - START_DT +1;

to

Table2:

Load id, Date(addmonths(monthstart(START_DT), iterno() -1)) as ReferenceDate

resident Table1

While Date(addmonths(monthstart(START_DT), iterno() -1) )<= END_DT ;


talk is cheap, supply exceeds demand
tresesco
MVP
MVP

PFA, Hope this is what you need.

Not applicable
Author

Thanks. Finally got the professional license and was able to view your file and it is quite helpful.

The second part of the code is not working for me the Makedate part, however, I just loaded the date table inline manually and it serves the purpose.