Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ranibosch
Creator
Creator

Sum duplication - object level

good day,

please find attached a file of my results on my model.

my problem is that if I sum my quantities on the object, my tonnage and units sold are over stated.

furthermore, should I fix this on a object or total script level?

thanks!

1 Solution

Accepted Solutions
ranibosch
Creator
Creator
Author

thanks, i've sorted this out in my script using temporary loads and then grouping it by document number..

View solution in original post

2 Replies
sunny_talwar

It would be ideal to fix this in the script by may be creating a separate table which keeps ItemsSold.ItemNo, ItemSold.Document No and all the those number which have one to one relationship with those two fields. This way, when you sum them, you won't be duplicating them. But if change the script is not a possibility... you can try this

Sum(Aggr(Sum(DISTINCT [ItemsSold.No of Units Sold]), [ItemsSold.Item No], [ItemSold.Document No]))

ranibosch
Creator
Creator
Author

thanks, i've sorted this out in my script using temporary loads and then grouping it by document number..