9 Replies Latest reply: Nov 27, 2012 9:43 AM by Richard Beeston RSS

    Count of Distinct IDFIELD Aggregate problem..

      I want to count the distinct IDField where the count of lines having a flag A or B is less than 5.



      I tried this but this is obviously wrong... 


      Count(Distinct if(Sum(if(FLAG='A' or FLAG='B',))<5,IDField))




      Do I need to use the AGGR function