Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
anguila
Partner - Creator
Partner - Creator

Nested aggr, aggr as a dimension of another aggr

Hi,

I have a simple table with 2 (calculated) dimensions and 1 expression:

Dimensions:

aggr(if(count(YearM) = count(total YearM),IdZone4),IdZone4)

if(IdZone=IdZone4, Distr)

Expression:

Distr

shot1.png

So now i want to concat all the values separated by ", " of the 3th column, so one more time I need another aggr and i have to put the expression and dimensions of the table on it. I tried this with no luck:

=concat(

aggr(Distr,aggr(if(count(YearM) = count(total YearM),IdZone4),IdZone4),if(IdZone=IdZone4, Distr))

,', ')

Any idea?

Thanks,

David.

1 Solution

Accepted Solutions
anguila
Partner - Creator
Partner - Creator
Author

The main issue was achiveing that text to link that expression in a selection, so I splitet the process in 3 steps.

1) Select field A with that text expression surrounded with '(' and concatenated with pipes '|')

2) Select all possible values from field B

3) Clear field A (with this way we didn't see all that before-selected values)

View solution in original post

2 Replies
whiteline
Master II
Master II

Hi

Remove second dimension and try this expression:

=concat(if(IdZone=IdZone4, Distr, null()),', ')

anguila
Partner - Creator
Partner - Creator
Author

The main issue was achiveing that text to link that expression in a selection, so I splitet the process in 3 steps.

1) Select field A with that text expression surrounded with '(' and concatenated with pipes '|')

2) Select all possible values from field B

3) Clear field A (with this way we didn't see all that before-selected values)