I need to refer to the first record in a details section for a formula.
Currently, my formula reads:
if previous({PURCHASE_RECEIPT_INVOICE.PART_NO}) = {PURCHASE_RECEIPT_INVOICE.PART_NO} then
((previous({PURCHASE_ORDER_LINE.FBUY_UNIT_PRICE}) - {PURCHASE_ORDER_LINE.FBUY_UNIT_PRICE}))*({PURCHASE_RECEIPT_INVOICE.QTY_ARRIVED})
else
0
My results are:
QTY: 58 Price: 3.22 Savings: 0.00
QTY: 50 Price: 8.42 Savings: -260.00
QTY: 56 Price: 3.22 Savings: 291.20
Instead of referring to the previous record, I would like it to refer the first record. Because the third line returns to the orignal price, the savings should be $0.00. Instead of the change of the second and third records.
Currently, my formula reads:
if previous({PURCHASE_RECEIPT_INVOICE.PART_NO}) = {PURCHASE_RECEIPT_INVOICE.PART_NO} then
((previous({PURCHASE_ORDER_LINE.FBUY_UNIT_PRICE}) - {PURCHASE_ORDER_LINE.FBUY_UNIT_PRICE}))*({PURCHASE_RECEIPT_INVOICE.QTY_ARRIVED})
else
0
My results are:
QTY: 58 Price: 3.22 Savings: 0.00
QTY: 50 Price: 8.42 Savings: -260.00
QTY: 56 Price: 3.22 Savings: 291.20
Instead of referring to the previous record, I would like it to refer the first record. Because the third line returns to the orignal price, the savings should be $0.00. Instead of the change of the second and third records.