Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a table of cost by kg, for multiple types of cost. There are costs for each combination of: Year,Product Group, Real Product and Package Type.
I also have a table of products, and each product has multiple cost by kg related.
I need to calculate the cost by kg for each product, and it's associated dimensions (Such as real product, rotulated product...), but I'm getting incorrect values when I use dimensions that are not the "keys" dimensions of the costs. (Year,Product Group, Real Product and Package Type.)
I've uploaded an example with the data and the expression that I am using.
How should I calculate the cost by Kg?
Thanks!!
May be you need this
=Sum([Cost by Kg] * Kg)/Sum(Kg)
Thanks!
Dumb of me..
I've tryied with a similar expression:
Sum([Cost by Kg])*Sum(Kg)
But with incorrect values. Could you pleas explain to me what is the difference with the following:
Sum([Cost by Kg] * Kg)
I ask, because in many cases both expression gave me the same values.
Thanks Sunny
Expression 1 will Sum Cost by Kg based on your dimension and then multiply it with Sum of Kg. Second expression will first multiply Cost by Kg and Kg per row and then sum it for each of your dimension.
Does that make sense?
Yes, a lot of sense. Thanks!