Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Miscalculating Sum

Hi All,

on my model i got a wrong result on Sum function.

as far as i know i don't have duplicated rows

after using Load Distinct on the relevant joined tables on the "DW", the problem seemed to be solved

was i doing the right thing? is that a good solution?

that's the "before" stage.

Sum needs to be equal to NetoWeigt

 

DateLotNetoWeightSum
2017-05-22G01362672430072900

Thanks

Avner

4 Replies
PrashantSangle

Hi,

Looks like data become 3 times more than actual data.

check any wrong join which you did in your script.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
PrashantSangle

or try below expression

sum(aggr(Distinct sum(NetoWeight),Lot))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
shiveshsingh
Master
Master

can you share the exact expression with data?

Anonymous
Not applicable
Author

Tanks for all of your replies

Checked the script and the process again

and found out that even if select only few fields, i need to use Distinct.

otherwise i end up with multiple lines, even if i can't see them.