4 Replies Latest reply: Oct 7, 2011 12:25 AM by dmitry RSS

    Can't understand a behavior of set expression

      Hi,

      I got the following data set:

       

       

      NAMEVERSION
      AAA1
      BBB2
      BBB3

       

       

      and use set analysis to a get maximum version of the records grouped by NAME with a current selection in account

       

      Max({$<VERSION={'=Aggr(Max(VERSION), NAME)'}>} VERSION)

       

      I expect the following:

       

       

      NAME-
      AAA1
      BBB3

       

      but have

       

      NAME-
      AAA1
      BBB2

       

       

      so it seems that inner aggregation doesn't work as I expect and instead returs the first value from the group (changin' the enclosed function to Min, Sum or whatever doesn't change the result).

       

      Anybody see a wick point in the approach?

       

      Thanks and regards,

      Dmitry