Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

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
Contributor II

Re: If statement for specific count aggregation

Hi,

You should use the count function inside the aggr function,

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

Regards,

Prabhu Appu