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: 
flottmen
Contributor
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
sunny_talwar

Or this

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

View solution in original post

4 Replies
sunny_talwar

Change your variable to this

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

sunny_talwar

Or this

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

flottmen
Contributor
Contributor
Author

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

sunny_talwar

No problem at all