Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a lines of sales and a price list on a specific date. The sales row has a field [Posting Date], the price list has [Start Date] field and the [Net Purchase Price].
Each line of sales should be added [Net Purchase Price] from the lines of the price list with the highest date.
e.g. Max([Starting Date]) <=[Posting Date]
TIA
Igor
Try this expression
Sum(Aggr( If(Max(TOTAL <Description, [Document No_], Lot, No_, [Posting Date], Vendor> If([Starting Date] <= [Posting Date], [Starting Date])) = [Starting Date], [Net Purchase Price]) , Description, [Document No_], Lot, No_, [Posting Date], Vendor, [Starting Date]))
can you please explain with some sample data and required output.
I must add field Net Purchase price to each row on certain date.
Try this expression
Sum(Aggr( If(Max(TOTAL <Description, [Document No_], Lot, No_, [Posting Date], Vendor> If([Starting Date] <= [Posting Date], [Starting Date])) = [Starting Date], [Net Purchase Price]) , Description, [Document No_], Lot, No_, [Posting Date], Vendor, [Starting Date]))
Thanks a lot, you made my day 🙂