Qlik Community

Qlik Sense App Development

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

flottmen
New Contributor

Set Analysis with Aggregate - Escape Filters

I have written the following expression:

Count(TOTAL DISTINCT {$<Affiliate={"=$(vDeliveredCount)>=250"}>} Affiliate)

The vDeliveredCount variable referenced evaluates to this: Count({$<DeliveryStatus={'D','O'}>} LeadId)

Basically, the idea here is to count Affiliates that have at least 250 delivered transactions.  This seems to be working as expected.  However, I need this count to be calculated the same no matter what filters have been set by the user.  Selecting one Affiliate in my table always reduces this count to 1.  I have tried both of the following in an attempt to escape the Affiliate filter:

Count(TOTAL DISTINCT {$<Affiliate=, Affiliate={"=$(vDeliveredCount)>=250"}>} Affiliate)

Count(TOTAL DISTINCT {$<Affiliate={"=$(vDeliveredCount)>=250"}, Affiliate=>} Affiliate)


Neither seem to generate the required result.  It seems like the second instance of the Affiliate set analysis simply replaces the first rather than both being evaluated.


Is there some syntax I can use to achieve the desired outcome? 

1 Solution

Accepted Solutions

Re: Set Analysis with Aggregate - Escape Filters

Or this

Count({<DeliveryStatus={'D','O'}, Affiliate>} LeadId)

4 Replies

Re: Set Analysis with Aggregate - Escape Filters

Change your variable to this

Count({1<DeliveryStatus={'D','O'}>} LeadId)

Re: Set Analysis with Aggregate - Escape Filters

Or this

Count({<DeliveryStatus={'D','O'}, Affiliate>} LeadId)

flottmen
New Contributor

Re: Set Analysis with Aggregate - Escape Filters

That did it.  Totally forgot to escape the filter in the count.  Thanks, Sunny.

Re: Set Analysis with Aggregate - Escape Filters

No problem at all

Community Browser