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: 
Sameer9585
Creator II
Creator II

Count Monthly

Hi,

I have a dataset which is having ID,Termination and Resignation and now I need the count of ID who have applied for resignation month wise and next is that I need to create an other measure in such a way that I need the cumulative difference from complete count of ID monthly.

Ex: If total 10 are there and 2 left on Jan I need Count as 8,if 3 left on feb I need count as 8-3=5 so on..

 

Below I provide the data set I am using in it Sheet 3 is to be focused.

Thanks,

 

2 Replies
sunny_talwar

Do you may be need IntervalMatch?

Table:
LOAD ID, 
     [Date of Resignation], 
     [Date of Termination]
FROM
[..\..\Downloads\sample3.xlsx]
(ooxml, embedded labels, table is Sheet3);

MinMax:
LOAD Min([Date of Resignation]) as MinDate,
	 Max([Date of Termination]) as MaxDate
Resident Table;

LET vMin = Peek('MinDate');
LET vMax = Peek('MaxDate');

Calendar:
LOAD Date,
	 MonthName(Date) as MonthYear;
LOAD $(vMin) + IterNo() - 1 as Date
AutoGenerate 1
While $(vMin) + IterNo() - 1 <= $(vMax);

IntervalMatch:
IntervalMatch(Date)
LOAD [Date of Resignation], 
     [Date of Termination]
Resident Table;

and then a chart where you have MonthYear as your dimension and Count(DISTINCT ID) as expression

Sameer9585
Creator II
Creator II
Author

I'm not getting the cumulative difference of COunt of ID