Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Reply
fosuzuki
Partner - Specialist III
Partner - Specialist III

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