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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Benh09
Contributor
Contributor

Summing rows based on a field match between rows

Hi all,

I am working on a visualization for summing the balance shown on a letter based on how many accounts are on said letter. Essentially i have a table like this:

Benh09_0-1756328511434.png

I want to sum the AmountDue where the rows = Consumer A, again at Consumer B, again at Consumer C and so on. I have tried everything to my currently limited knowledge along with combing through the forum but I have been unable to find an answer. Is this possible in Qlik or should i rework the dataset to sum the values before loading it into Qlik? Thanks for any help.

 

 

Labels (2)
1 Solution

Accepted Solutions
robert_mika
Master III
Master III

Try: 

Sum(Aggr(Max(AmountDue), Consumer, LetterID))

View solution in original post

4 Replies
savioricardog
Contributor III
Contributor III

Hi @Benh09 

Do you wanna something like this?

savioricardog_0-1756334377829.png

 

robert_mika
Master III
Master III

Try: 

Sum(Aggr(Max(AmountDue), Consumer, LetterID))

Benh09
Contributor
Contributor
Author

This worked perfectly, thank you so much. I was using Sum(Aggr but i was unaware i could use the max function to essentially create a temporary table which i could then sum from. Very clever, thank you!

robert_mika
Master III
Master III

You are welcome. Happy to help