Qlik Community

Ask a Question

Qlik Sense App Development

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

Announcements
Join us March 10th, 7 ways modern analytics can help you take smarter action. REGISTER NOW
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

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

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

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

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