Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum of duplicate values

Hi all,

I have a problem on qlikview wich start giving me headache !!

Heres my table :

Seller Amount
A 121
A 121
A 121
B 541
B 630
C 841

When i do sum(Amount) = 2133 and count(Amount) = 4, wich is obviously wrong ....

What would be the solution for suming duplicate values ?

Many many thanks in advance

2 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

Are you sure about results you mentioned? See enclosed.

Not applicable
Author

Hi Anasb,

Here what you have to do is you just need to calculate the sum of amount by using "sum(distinct Amount)" . You are getting wrong aswer because all the sum is getting added if you do not use the distinct keyword. But the count function is working fine because you have distinct 4 numbers in you sum coloumn. Hope this helps you.

thanks .....JosephCool