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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
aliyoung92
Contributor III
Contributor III

AGGR Count

I've got a straight table where I want to do a count to get the total for one dimension:

Dim 1    Dim 2   Dim 3  Dim 4    Count    Required Column 

A             B            C            E             10            15

A             B            D            E             5               15

 

I want to get a total count for the table. I've tried:

 = AGGR(COUNT( DISTINCT Field),Dim1, Dim2, Dim4)  

This works for the first line in the table, but then I just get a blank for the second.

Does anyone know of a solution?

Labels (1)
1 Solution

Accepted Solutions
aliyoung92
Contributor III
Contributor III
Author

Unfortunately just gives a 0 rather than a blank for the other rows

View solution in original post

2 Replies
Anonymous
Not applicable

Try the following:

=SUM( AGGR(COUNT( DISTINCT Field),Dim1) )+SUM( AGGR(COUNT( DISTINCT Field),Dim2) )+SUM( AGGR(COUNT( DISTINCT Field),Dim3) )+SUM( AGGR(COUNT( DISTINCT Field),Dim4) )

aliyoung92
Contributor III
Contributor III
Author

Unfortunately just gives a 0 rather than a blank for the other rows