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: 
Anonymous
Not applicable

ignore duplicate records

Hello,

I have a table, that looks like this:

Number      total costs
123456200
123456200
123456200
654321400
654321400
654321400
765432200
234567300
234567300

Now I wanna make a sum() over all the costs but with every "total cost" of every "number" only once.

So the sum() should be 1.100 and not 2.600?? Is there a function for this?

Thank you in advance

Tina

2 Replies
tresesco
MVP
MVP

Straight table:

Dim: Number

Exp: Sum( Distinct [total costs])

In text box: =Sum(Aggr(Sum( Distinct [total costs]), Number))

Edit: corrected bracket

big_dreams
Creator III
Creator III

why don't you load distinct records during load statement?

like Load distinct Number, cost from table

Regards,