12 Replies Latest reply: Feb 11, 2013 4:10 PM by Stefan Wühl RSS

    Problem with Set analysis

      Hi Friends,

       

      I have a requirement to show minimum month data by customer. I tried set analysis to do this but its not working as expected. Could anyone please help me on this issue.

      I greatly appreciate your help in advance

       

      My original data set is

       

      Cust IDMonthYearQuantity
      112Feb-1210
      111Mar-1210
      114Apr-1210
      117Mar-1210
      111Apr-1220
      112Apr-1220
      121Jan-1210

       

       

      Correct Output

       

      Cust IDMinimum MonthMonth Quantity
      112Feb-1210
      111Mar-1210
      114Apr-1210
      117Mar-1210
      121Jan-1210

       

      Set analysis i used to restrict the min month in expression is

       

       

      sum

       

      ({<MonthYear={'$(=MinString(MonthYear))'}>}Quantity

      )

       

       

      output i am getting is

      CustIDMin MonthMin Month Quantity
      Apr-1250
      111Apr-1220
      112Apr-1220
      114Apr-1210
      117Mar-120
      121Jan-120

       

       

      I have attached my qvw file as well.