1 Reply Latest reply: Jan 19, 2012 9:49 PM by Fernando Suzuki RSS

    aggr and set analysis

      In a textbox, why does the following give the result "alfa, gamma" instead of just "alfa" ?

      =concat({$<Names={alfa,gamma}>}

                aggr({$<Names={alfa,beta}>}Names , Names

                ),',')

       

       

      the Names table looks like this:

       

      Names

      alfa

      beta

      gamma

       

      I cant get the aggr function to work with set analysis. I always need to put in another function like sum or concat to limit the data set with.

      But the manual does say that sets work in aggr:

      "By default, the aggregation function will aggregate over the set of possible records defined by the selection.

      An alternative set of records can be defined by a Set Analysis (page 805) expression."

      and

      "aggr ([ distinct | nodistinct ] [{set_expression}]expression {,dimension})"

       

       

       

      /help much appreciated

        • aggr and set analysis
          Fernando Suzuki

          Hi,

           

          Actually I think your expression has an error. Inside your aggr() function there should exist a set expression like concat().

          "aggr ([ distinct | nodistinct ] [{set_expression}]expression {,dimension})"

           

           

          Hope this points you in the right direction.

          Regards,

          Fernando