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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr Sum not working

Hi Everyone

Thanks in advance, I have checked for explanations on Aggr expressions over dimension but I can't work out why mine won't work any help would be appreciated.

I have a simple table:

EnrolID, Nominal Code, Invoice Basic(£), Date, StudentWeeks

I group the data by EnrolID, Nominal Code, and Date.

I have calculated the Year, Month, Week to date flags on my master calendar so that I can total the Invoice Basic and Student Weeks values.

I use the following for Invoice Basic: Sum({< CurWTDFlag = {'1'} >} InvoiceBasic) and this works fine because for every row in my table I have a daily value

I use the following for StudentWeeks: Sum({< CurWTDFlag = {'1'} >} StudentWeeks), however I need to Aggr the sum by EnrolID and Date, so that I get the correct value: SUM(AGGR(StudentWeeks, intEnrolId,Date))

how do I combine the  Sum({< CurWTDFlag = {'1'} >} StudentWeeks) using an Aggr expression SUM(AGGR(StudentWeeks, intEnrolId,Date))

I've tried Aggr(Sum({< CurWTDFlag = {'1'} >} StudentWeeks),intEnrolId,Date) and it does not work.

Thanks again

David

3 Replies
nilesh_gangurde
Partner - Specialist
Partner - Specialist

Hii,

Use the below mentioned expression:

Aggr(Sum({< CurWTDFlag = {'1'} >} StudentWeeks), intEnrolId,Date)

-Nilesh

vikasmahajan

Hii,

Have you taken intEnrolId,Date dimension in charts ? ,AGGR require dimensions

your expression is ok. Aggr(Sum({< CurWTDFlag = {'1'} >} StudentWeeks),intEnrolId,Date)

If possible attach demo qvw.

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable
Author

Hi Vikas

I am using a pivot table for the data and the only dimension I select is School the rest is being competed as an expression using the tables I've created.

I will try an create a demo if I can but I'm not sure where to start with that!

David.

ps Thanks now sorted, it was a data issue!