I need to compare the last value row with the new added row, for the same item.
Eg: Last row that been added was a row with 10 bananas, now I add a row with 5 bananas, and I need to check the difference between those rows 10 bananas - 5 bananas = 5 bananas.
How can I do it?
In addition to what @1minManager just wrote, you may find useful information here:
Edit : plus, at typing “get last row” in the search bar…guess what
I think you will get the last row quantity in two steps. Request you to explore below.
First column called say [Latest Product ID] could calculate the previous latest row for the same product with MAXROW() expression something like
MAXROW(“Table Name”,"_ROWNUMBER", [Product ID]=[_THISROW].[Product ID])
The expression may need change based on any other conditions you may have in the app such as maybe latest date instead of row number etc. and any other qualifying condition as say [Order ID[ to restrict the latest [Product ID] to that [Order ID]
Then the difference you could get in another column with an expression something like
[Latest Product ID].[Quantity] - [Quantity]