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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
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

2 Replies
Anil_Babu_Samineni

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
tresesco
MVP
MVP

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.