4 Replies Latest reply: Dec 12, 2017 3:08 PM by Sunny Talwar RSS

    Set Analysis with Aggregate - Escape Filters

    Eric Flottmann

      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?