CR vers 8.00
SQL database
I need to calculate the margin on each line item of an invoice. Problem is, I need to include in the Item Cost a share of the cost for the pallet the Item is sitting on. We use over 20 different types of pallet (i.e. 20 different costs ), but only one type per invoice. Different weights may be placed on these pallets. e.g.
Line Item 1 6.0 tonnes (5 x 1.2 tonne pallets)
Line Item 2 4.8 tonnes (4 x 1.2 tonne pallets)
Line Item 3 2.0 tonnes (2 x 1.0 tonne pallets)
Line Item 4 11 pallets
I have calculated the share of the total pallet cost per item as
Line Item 1 6.0/12.8 x 11 = 5.17 = 5
Line Item 2 4.8/12.8 x 11 = 4.13 = 4
Line Item 3 2.0/12.8 x 11 = 1.72 = 2
Now I need to identify the cost of the particular pallet used in Line 4 and then add a cost equal to the number of pallets used per line x the pallet cost.
I've tried several formulae to isolate the cost based on "if the Line Item = "pallet" then "Cost", but of course as soon as I use this on a Line Item which is NOT a pallet, the result is zero.
I've tried grouping into "Pallet" and "Other" items, but still have the same problem. The Pallet Cost formula will not work on any line which is not a pallet.
Report is also grouping by Customer, and Invoice number.
Perhaps variables are the answer, but I have not had much experience with them.
Any suggestions would be warmly welcomed.
SQL database
I need to calculate the margin on each line item of an invoice. Problem is, I need to include in the Item Cost a share of the cost for the pallet the Item is sitting on. We use over 20 different types of pallet (i.e. 20 different costs ), but only one type per invoice. Different weights may be placed on these pallets. e.g.
Line Item 1 6.0 tonnes (5 x 1.2 tonne pallets)
Line Item 2 4.8 tonnes (4 x 1.2 tonne pallets)
Line Item 3 2.0 tonnes (2 x 1.0 tonne pallets)
Line Item 4 11 pallets
I have calculated the share of the total pallet cost per item as
Line Item 1 6.0/12.8 x 11 = 5.17 = 5
Line Item 2 4.8/12.8 x 11 = 4.13 = 4
Line Item 3 2.0/12.8 x 11 = 1.72 = 2
Now I need to identify the cost of the particular pallet used in Line 4 and then add a cost equal to the number of pallets used per line x the pallet cost.
I've tried several formulae to isolate the cost based on "if the Line Item = "pallet" then "Cost", but of course as soon as I use this on a Line Item which is NOT a pallet, the result is zero.
I've tried grouping into "Pallet" and "Other" items, but still have the same problem. The Pallet Cost formula will not work on any line which is not a pallet.
Report is also grouping by Customer, and Invoice number.
Perhaps variables are the answer, but I have not had much experience with them.
Any suggestions would be warmly welcomed.