Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

count of active months

Hi,

With below expression, we are able to get sum of value which we have in 18months. How can we get count of the months


Sum({<Date = {"$(='>=' & Date(AddMonths(Max(Date), -24)) & '<=' & Date(AddMonths(Max(Date), -6)))"}>}Value)


For example, i will be having data as 100 in last 12 months, this does not mean as in all last 12 months i have data.

how can i get months and count of months in which i have data.


Can anyone please suggest on this

24 Replies
YoussefBelloum
Champion
Champion

NO, on the app I send to you above, the expression used is this one :

=Count({<data1={"=len(trim(data1))<>0"}>}date)

Anonymous
Not applicable
Author

thankyou, it worked

Anonymous
Not applicable
Author

thank you, this is very helpful

Anonymous
Not applicable
Author

i need to get values as

if i have active count of months in last 12 to 24 months > 6 and active count months > 6 in  last 1 to  12 months as ' R'

if i have active count of months in last 12 to 24 months =0 and active count months > 6 in  last 1 to  12 months as ' N'

if i have active count of months in last 12 to 24 months > 6 and active count months < 6 in  last 1 to  12 months as ' F'

if i have active count of months in last 12 to 24 months < 6 and active count months < 6 in  last 1 to  12 months as ' Y'


I tried using below but one condition for 'F' i am not able to get


if (count( {< Date = {"$(='>=' & Date(AddMonths(Max(Date), -24)) & '<=' & Date(AddMonths(Max(date), -12)))"},

Monthdate = {"=count(value)>0"} >} Distinct Monthdate ) > 6,

if(count( {< Date = {"$(='>=' & Date(AddMonths(Max(Date), -12)) & '<=' & Date(AddMonths(Max(date), 0)))"},

Monthdate = {"=count(value)>0"} >} Distinct Monthdate ) > 6,'N','R'),'Y')


Can anyone suggest here

Anonymous
Not applicable
Author

Can anyone provide the suggestion on this