diagonal76
Technical User
Hi, I'm trying to make some formulas to calculate some differences between prices. I have the following information: item, order date, price and delivered qty. I would then also calculate order value based on price and delivered qty.
What I would like to do is to compare the last purchase prices from last year against the purchase prices from this year (also with values instead of just % changes in the prices).
item price order date delivered qty
A1 41,00 5.10.2005 30
A1 41,00 5.10.2005 30
A1 41,00 10.10.2005 30
A1 41,00 10.10.2005 18
A1 50,00 10.2.2006 11
A1 61,40 17.2.2006 7
How could I create such a formula in Crystal Reports? Basically in the example case it would compare price of item A between 10.10.2005 (max order date from last year)and orders from 2006. The calculation is theoretical as it would use the 2006 deliveries multiplied with 2005 prices to demonstrate whether the price level is going up or down. Example result returned by formula would be:
Price variance = ([50*11 + 61,40*7] - [(7+11)* 41]) / (50*11 + 61,40*7) * 100% = 24,7 % increase in item price. The reason why value is used is that items would be grouped together based on their hierarchy so order values are needed in analysis.
What I would like to do is to compare the last purchase prices from last year against the purchase prices from this year (also with values instead of just % changes in the prices).
item price order date delivered qty
A1 41,00 5.10.2005 30
A1 41,00 5.10.2005 30
A1 41,00 10.10.2005 30
A1 41,00 10.10.2005 18
A1 50,00 10.2.2006 11
A1 61,40 17.2.2006 7
How could I create such a formula in Crystal Reports? Basically in the example case it would compare price of item A between 10.10.2005 (max order date from last year)and orders from 2006. The calculation is theoretical as it would use the 2006 deliveries multiplied with 2005 prices to demonstrate whether the price level is going up or down. Example result returned by formula would be:
Price variance = ([50*11 + 61,40*7] - [(7+11)* 41]) / (50*11 + 61,40*7) * 100% = 24,7 % increase in item price. The reason why value is used is that items would be grouped together based on their hierarchy so order values are needed in analysis.