Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
sunil-kumar5
Creator II
Creator II

3 month Active Partner count

Hello All,

I have a below table and I am looking for activating partner's count.

Activating partner count = A partner who installed (take installation date)>=1 license number in last three months

Partnernamelicensenumbersoftwaretypeinstallationdateamcduedate
A1656MJan-20Jan-21
B1654CFeb-18Feb-19
C1590MMar-20Mar-21
D1361MFeb-19Feb-20
A1234MFeb-20Feb-21
B1571CApr-20Apr-21
C1981MApr-20Apr-21
D1636CMar-20Mar-21
D1602CFeb-20Feb-21
A1921MJan-20Jan-21
B1725MFeb-19Feb-20
B1732MMar-20Mar-21
C1706CMar-20Mar-21
D1996MMar-18Mar-20

 

Thanks

8 Replies
Vegar
MVP
MVP

Something like the expression below. I assume that your installation date is a dual work a numeric date value. 

Count({<installationdate={">=$(=monthstart(today(), - 2))"} >} DISTINCT Partnername) 

sunil-kumar5
Creator II
Creator II
Author

Hi Vegar,

Its giving 0 as a result. You didn't mention license number anywhere because it would be the count of license number which is installed >=1.

Hope it clears.

Thanks

 

 

Vegar
MVP
MVP

Your sample did not contain any data within the last three months from today. I changed the expression to consider the last three months from your latest installation date instead. I am not really sure what KPI you are looking for, so I added two variants below.

No of partners that have installed something in the last months.

Count({<installationdate={">=$(=monthstart(max(installationdate), - 2))"} >} Distinct Partnername)

 

No of licenses installed in the last months.

Count({<installationdate={">=$(=monthstart(max(installationdate), - 2))"} >} licensenumber)

sunil-kumar5
Creator II
Creator II
Author

Hi Vegar,

Actually we have a list of partner's name and we just wanted to check as how many partners are there who installed greater than 1 license in last three months. I have to show the result in KPI as how many partners are active, this is actually the condition if partner is installing >=1 license in last three month that means they are working and active for us.

I have used both the expression that you provided however again getting zero result.

Please advise

Vegar
MVP
MVP

Please verify that your [installationdate] is a dual holding a numeric date and that it is not a string. 

 

If it is a plain string then you need to interpret it as a date when loading it into your data model. Maybe like below.

LOAD 
	Partnername,
	licensenumber,
	softwaretype,
 	date#(installationdate, 'MMM-YY') as installationdate,
	date#(amcduedate, 'MMM-YY') as amcduedate
inline [
Partnername,licensenumber,softwaretype,installationdate,amcduedate
A,1656,M,Jan-20,Jan-21
B,1654,C,Feb-18,Feb-19
C,1590,M,Mar-20,Mar-21
D,1361,M,Feb-19,Feb-20
A,1234,M,Feb-20,Feb-21
B,1571,C,Apr-20,Apr-21
C,1981,M,Apr-20,Apr-21
D,1636,C,Mar-20,Mar-21
D,1602,C,Feb-20,Feb-21
A,1921,M,Jan-20,Jan-21
B,1725,M,Feb-19,Feb-20
B,1732,M,Mar-20,Mar-21
C,1706,C,Mar-20,Mar-21
D,1996,M,Mar-18,Mar-20];

exit script
sunil-kumar5
Creator II
Creator II
Author

Hi,

It is written as $numeric $integer $timestamp$date but not getting result.

Vegar
MVP
MVP

It could be that you need apostrophes around your $() like I've done below.

Count({<installationdate={">='$(=monthstart(max(installationdate), - 2))' "} >} Distinct Partnername)

 

sunil-kumar5
Creator II
Creator II
Author

I am using the same you are suggesting like below:

Count({<InstallationDate={">='$(=monthstart(max(InstallationDate), - 2))' "} >} Distinct [Partner Name]) 

but only getting zero value in my KPI