Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
wcoleman0908
Partner - Contributor III
Partner - Contributor III

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 (1)
3 Solutions

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

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 - Contributor III
Partner - Contributor III
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 - Contributor III
Partner - Contributor III
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
dplr-rn
Partner - Master III
Partner - Master III

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?

wcoleman0908
Partner - Contributor III
Partner - Contributor III
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: ?

dplr-rn
Partner - Master III
Partner - Master III

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

i dont see category code field in your excel

wcoleman0908
Partner - Contributor III
Partner - Contributor III
Author

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

Thanks buddy