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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
TheresaB_4
Contributor III
Contributor III

Aggr function

Hi everyone, I am trying out my first function. I need some help.

background:
I want to count the Account number(EAN) where the customerStatus is 'Active'

Is this possible if I make this a measure or should I make this a Dimension.

here is my aggr 

=aggr(Count(distinct EAN),<CustomerStatus={'Active'}>)

Labels (1)
1 Solution

Accepted Solutions
Aditya_Chitale
Specialist
Specialist

Why do you want  to use aggr here ? You can write  a simple set analysis expression inside count() function:

count({<CustomerStatus={'Active'}>}distinct EAN).

Aggr is mostly used when you want to perform aggregations on multiple sub-sets of data in a field.

 

Regards,

Aditya

View solution in original post

2 Replies
justISO
Specialist
Specialist

Hi, try this maybe?: Count({<CustomerStatus={'Active'}>} distinct EAN)

Aditya_Chitale
Specialist
Specialist

Why do you want  to use aggr here ? You can write  a simple set analysis expression inside count() function:

count({<CustomerStatus={'Active'}>}distinct EAN).

Aggr is mostly used when you want to perform aggregations on multiple sub-sets of data in a field.

 

Regards,

Aditya