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

Announcements
Posting on Qlik Community is temporarily paused. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr & aggr(max)

Hi,

I am really confused to use aggr function as am not clear reg. the difference between

sum(Aggr(Total_Payment), ID)

and

sum(Aggr(max(total_payment), ID))

Please help me understanding the difference.

Thanks,

Rohini. M

Labels (1)
2 Replies
Anil_Babu_Samineni
MVP
MVP

First one is simple Aggregation which values from ID based on Total_Payment

Second one is Only get which is the Maximum value from Total_Payment which Calc part should ID

OR

Check by your hand using this

1) Sum({<total_payment=>}ID)

2) Sum({<total_payment= {"$(=Max(total_payment))"}>}ID)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresB
Champion III
Champion III

sum(Aggr(Total_Payment), ID) - Using aggr() without any aggregation function inside doesn't make much of sense.

sum(Aggr(max(total_payment), ID)) - This gives you sum of all the max values of Total_Payment against each IDs.

To understand such expression, best to create a sample and try to understand the output.