Hi!
I am hoping to compute discount using last price of the previous quarter or the first asp as the beginning price. My concept would be:
Discount = Trxn ASP - Base ASP
Notes:
Base ASP should all have values since there should always be either first or last asp to use and deduct with trxn asp.
***I think I should tweak the formula in red font under base asp in order for this to be possible but I can't think of what it should be. Please help. Thanks
Hi Anna,
Here is my version
First I calculated Base ASP as
if [First ASP]<>0 then [First ASP]
elseif [Last ASP]<>0 then [Last ASP]
elseif [First ASP]=0 AND [Last ASP]=0
then 99999 -----trying to distinguish for later use
end
The based on earlier logic will fix all records 99999 to show previous Base ASP
if attr([Base ASP])<>99999 then attr([Base ASP] )
ELSE
(previous_value(attr([Base ASP]))) end
This is how it appears at my end.