What formula to see the current inventory level of each item in an inventory app?

Hi guys, I am following the inventory management app tutorial. Yet when reaching the Step 3: Calculate the real-time inventory level I have to provide a formula to see the current inventory level of each item in our app. The calculation formula is pretty simple:

Current stock level = initial stock + stock in – stock out

But when I want to tell our app how to calculate the inventory level, I go to Data>Columns and in the “Products” table select Add virtual column and add this app formula in the popup box:

COUNT([Related Purchases]) - COUNT([Related Sales]) + [Initial Stock].

But it tells me there are no related purchases, nor Related Sales

If you would have set up the references correctly, this should not be a problem.

Purchases and Sales, both need to have a reference to the product table, meaning which product are we selling or purchasing.

In all probability you have not set up the reference columns

1 Like

Hi @Antoine_Compagnie

You may want to have a look to this sample app to better understand what the problem is:
https://www.appsheet.com/samples/Manage-stock-and-sales?appGuidString=63e843cc-cb9d-4d75-9fe9-c0d408542541

Please click on “look under the hood” button.

Let us know if that’s OK for you.

Cheers !

1 Like