For some reason I cannot figure out how to combine or use the needed expressions to get the list I need. Here is what I am looking to select (in more of a SQL format):
SELECT TOP 2 [Quantity] FROM Batch Details WHERE AND([Batch ID]=[_THISROW].[Batch ID], [Code]=[_THISROW].[Code], [Offer]=[_THISROW].[Offer]) ORDER BY [_RowNumber] DESC
How would I write that using an AppSheet expression? Once I have those two Quantity values, I will wrap them in a SUM() function. So, in other words, I want the two most recent Quantity values that meet the given filtering criteria. Thanks for any help!