# Hello Everybody To calculate Current Inventor...

(Jason F) #1

Hello Everybody To calculate Current Inventory using virtual Column with this formula and it works fine

=SUM([tblPurchases][Quantity]) - SUM([tblSales][Quantity])

but now adding STATUS to the tblSales So need to calculate only the ones with status is “SHIPPED” not “READY”,

What would be the formula? Thanks

(Steven Coile) #2

I’m not sure it can be done using lists, unless you also define and instead use lists that include the additional selection criteria. For instance, define the columns tblPurchasesShipped and tblSalesShipped.

(Aleksi Alkio) #3

@Jason_F You can do that like…

SUM([tblPurchases][Quantity]) - SUM(SELECT([tblSales][Quantity],[STATUS]=“Shipped”))

(Steven Coile) #4

@Aleksi_Alkio Neat!!!