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

Count number of subdimension items

Hi all,

I have a chart in which I have two dimensions (such a in the below Excel example): Group as the first dimension and Item as the second dimension. The next column(s) are defined by my expression.

I would like to count the number of items for every group, and put it between brackets next to the Group description: A (1), B (2), C(2) and D (4).

However, the following does not work:

= Group & ' (' & count(Item) & ')'

Any ideas?

error loading image

Thanks and regards,

Fréderic

1 Solution

Accepted Solutions
Not applicable
Author

Hi Frederic,

You should make this as dimension:

=Group & ' (' & aggr(count(Item),Group) & ')'

You have to aggregate count(Item) via first dimension - in your case Group.

Regards,

Miha



View solution in original post

2 Replies
Not applicable
Author

Hi Frederic,

You should make this as dimension:

=Group & ' (' & aggr(count(Item),Group) & ')'

You have to aggregate count(Item) via first dimension - in your case Group.

Regards,

Miha



Not applicable
Author

Works like a charm

Thanks Miha!