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 if question

Hi,

I've got 2 separate questions here:

1) How do I adjust the expression below to give me a count of items that =1?

=count({$<Entity={'RNA'},[Reporting Date]={">=$(=Addmonths(max({1}[Reporting Date]),-5))"}>}aggr($(vColorIndex),[Reporting Month-Year],Entity))

2) The expression below gives me a count of items for the prior 6 months, how do I adjust it to give me the count for items 7-12 months ago? e.g. - for the 6 month period prior to the most recent 6 months. So if the most recent 6 months are July-Dec, I want to find the count for Jan-June.

Thanks!

1 Reply
vishsaggi
Champion III
Champion III

May be try this?

1.= Sum(Aggr(IF(count({$<Entity={'RNA'},[Reporting Date]={">=$(=Addmonths(max({1}[Reporting Date]),-5))"}>}aggr($(vColorIndex),[Reporting Month-Year],Entity)) = 1, 1,0), Entity))


2.
May be try this in your set


= count({$<Entity={'RNA'},[Reporting Date]={">=$(=Addmonths(max({1}[Reporting Date]),-12))<=$(=Addmonths(max({1}[Reporting Date]),-6))"}>}aggr($(vColorIndex),[Reporting Month-Year],Entity)