Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum() Question

Hello~

I just want to ask why the function sum() doubles up my original value.

what do you think are the causes?

Thanks,

Donna

5 Replies
SunilChauhan
Champion
Champion

u have  duplicates in ur table

if u see frequency of column amountfield then u will understand.

use sum(distinct amountfield)

Sunil Chauhan
Not applicable
Author

if i use distinct, it won't tally with the 'total' at the end of the table.

i have tried distinct but end up not equaling with the summed values and the total displayed.

khadeer
Specialist
Specialist

Please check the data before joins with other table and after joins. Duplication occurs for joins. It will helps u.

SunilChauhan
Champion
Champion

can please come up with sample file if possible

Sunil Chauhan
Not applicable
Author

alright, i will be checking my script and get back to you. thanks