Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
wcoleman0908
Partner
Partner

AGGR not cooperating

The AGGR function is not returning what I thought it should have based on my data. The visual shows 23 which is incorrect. The number should be 276, can anyone see what is happening and why it doesn't work as expected?

I'm sure its me 🙂

The Expression is: aggr(Sum([Student Count]), StudentID, StudentCategoryID)

wcoleman0908_0-1603136302990.png

 

Labels (2)
3 Solutions

Accepted Solutions
dilipranjith
Partner
Partner

you need another sum around the aggr.

Aggr essentially returns a table with the value there so in your case it returns

StudentID, StudentCategoryID, Sum([Student Count])

 

what are the other dimensions in your chart?

View solution in original post

wcoleman0908
Partner
Partner
Author

There is a category field, and a category Code field as other dimension. So what would the New AGGR STATEMET LOOK LIKE?

Old: AGGR(Sum([Student Count]), StudentID, StudentCategoryID)

New: ?

View solution in original post

wcoleman0908
Partner
Partner
Author

No sorry it was test data but i added the update you suggested and it now works properly.

Thanks buddy

View solution in original post

4 Replies
dilipranjith
Partner
Partner

you need another sum around the aggr.

Aggr essentially returns a table with the value there so in your case it returns

StudentID, StudentCategoryID, Sum([Student Count])

 

what are the other dimensions in your chart?

View solution in original post

wcoleman0908
Partner
Partner
Author

There is a category field, and a category Code field as other dimension. So what would the New AGGR STATEMET LOOK LIKE?

Old: AGGR(Sum([Student Count]), StudentID, StudentCategoryID)

New: ?

View solution in original post

dilipranjith
Partner
Partner

Sum(AGGR(Sum([Student Count]), StudentID, StudentCategoryID) )

i dont see category code field in your excel

wcoleman0908
Partner
Partner
Author

No sorry it was test data but i added the update you suggested and it now works properly.

Thanks buddy

View solution in original post