3 Replies Latest reply: Oct 12, 2016 5:20 PM by Oleg Troyansky RSS

    AND operation in set analysis

    Josh Chang


      In the example as attached, I would like to count how many IDs with '*-RAM' and their [Ship Year] is '2009'.

      The express 'Dispatch' is given as

      Sum(Aggr(Count (DISTINCT {<ID = p({<[Ship year]={'2009'}>}) * p({<ID={'*-RMA'}>})>}ID),CalendarYY,CalendarWW))


      The Dispatch count should be zero for CalendarYY = 2009 and CalendarWW = 01.

      Somehow, Dispatch shows 8 and it seems the expression only considers the term ID='*-RMA' only.

      Where did I make a mistake?