|
I am trying to write a formula that displays the MOST RECENT "Unit_Price" field (based on the "Entry_Date" field), with the condition that the price needs to correspond with an Entry_Date 6 months old or less.
The formula I wrote gives me EVERY Unit_Price where the Entry_Date is 6 m/o or less. Here's my formula:
IF {SO_DETAIL.ROUTE_CODE} = 'S'
AND {SO_DETAIL.ENTRY_DATE} in date (dateadd('m',-6,{SO_DETAIL.ENTRY_DATE})) to {SO_DETAIL.ENTRY_DATE}
THEN {SO_DETAIL.UNIT_PRICE}
How do I restrict this to only the MOST RECENT Unit_Price? I have seen someone mention the =maximum() function but I'm not sure how that works.
|