Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register 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