Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

Not applicable

Count greater than

Hi I have this expression which works fine for the table below:

count({$<ClientId={"$(vClientId)"}>}Aggr(count(DISTINCT AssignedAgent),assignwarehouse.LeadId))

ClientID     assignwarehouse.LeadId     AssignedAgent

ABC          123                                   1

ABC          123                                   2

ABC          777                                   4                                  

ABC          777                                   5

ABC          777                                   1

I want to put a filter where count(AssignedAgent)>2 .

I tried this without luck:

COUNT({$<ClientId={"$(vClientId)"},Aggr(count(DISTINCT AssignedAgent),assignwarehouse.LeadId)={">2"}>}Aggr(count(DISTINCT AssignedAgent),assignwarehouse.LeadId))

Please help !

3 Replies

Re: Count greater than

No, this won't work, only field names (no expressions) allowed on left side of the set modifier's equal sign.

You seem to have another dimension in your table, can you tell which one? Is this a primary key field in the context of your table, then you can write something like

COUNT({$<ClientId={"$(vClientId)"}, YourField = {"=Count(AssignedAgent)>2"} >}Aggr(count(DISTINCT AssignedAgent),assignwarehouse.LeadId))

Maybe this field is assignwarehouse.LeadId ?

Not applicable

Re: Count greater than

This is my entire table:

ClientID     assignwarehouse.LeadId     AssignedAgent   AssignDate

ABC          123                                   1                         2015-1-1

ABC          123                                   2                         2015-1-1

ABC          777                                   4                         2015-1-1       

ABC          777                                   5                         2015-1-1

ABC          777                                   1                         2015-1-1

So, you mean to say I do a count of AssignDate in the filter? Instead of count of the expression?

Sorry, I'm new to Qlik so my understanding is not that great yet.


Re: Count greater than

In above shown table with the four columns, only AssignedAgent is an expression column, all other 3 columns are dimensions?

There must be some difference in the combination of dimension values for every line.

Community Browser