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: 
Not applicable

If statement for specific count aggregation

I want to test if the count aggregation is <=3. I tried putting <=3 but it didn't work.  If count is <=3, sum(3) else no equation. How can I solve this. Thanks for your help.

If($(Tmonths)=10 or $(Tmonths)=11 or $(Tmonths)=12

and count({<cyear= {$(Tyear)}>}

aggr(DISTINCT Basic,SEF,qtr,cyear,OwnerNum,BINum,PCINum,SINum,MDINum,Parcel,PType))<=3,

sum(3),

)

1 Reply
prabhuappu
Creator II
Creator II

Hi,

You should use the count function inside the aggr function,

if(aggr(Count(Fields), <Group by Fields>)<=3,Sum(3), ....)

Regards,

Prabhu Appu