Calculating real-time inventory not working

Hi everyone, 

New to AppSheets but trying to learn and read up on the basics. I'm having an issue with calculating real time inventory.

 

I have items set up so there is an initial stock level, stock in, stock out. 

 

I also have barcodes enabled so I can choose stock-in, scan the barcode, add quantity of the item. 

 

This should simply update the current stock level of the item.

 

What is going wrong is it will not count the quantity of the item towards the current stock but just increase the current stock by 1. For example if I'm trying to add 10 pieces of Product A, I would have to add it 10 times as it ignores the quantity I type in and just counts each time I add the product once. It appears that it's counting "Related Purchases."

I've tried to figure it out but cannot get it to add the quantity no matter what changes I make. Many thanks in advance - Alvar

 

Here are some screenshots which should hopefully make it easier to understand what I'm getting at:

adding1.PNG

adding2.PNG

adding3.PNG

โ€ƒ

This is how I have it setup:

โ€ƒ

 

purchases.PNG

product.PNG

related-purchases.PNG

^ It's adding Related Purchases so I tried changing the formula within related purchases to add product barcode + quantity but I'm plagued with errors constantly. I was hoping once I could get this to count correctly everything would work properly.

current-stock1.PNG

I would think that as long as related purchases had the correct format this calculation wouldn't need to be changed.

current-stock2.PNG

โ€ƒ

 

โ€ƒ

 

โ€ƒ

 

โ€ƒ

โ€ƒ

โ€ƒ

Solved Solved
0 5 389
1 ACCEPTED SOLUTION

5 REPLIES 5

Thank you for replying so quickly. 

Unfortunately that gives me an expression error. 

b6df9d9a-06ee-4a29-9b6c-2b1818c6d66d.png

I've tried changing the type of the column from list to number and still receive the error. 

So I tried changing the expression based on the link to the above article but no luck ๐Ÿ˜ž

sum3.PNG

โ€ƒsum2.PNG

 

Hi Marc,

 

Thank you so much! 

After reading all the links you posted and a bit of trial and error (mostly trial) I was able to get it to work as needed using this:

 

SUM([Related Purchases][Quantity]) - SUM([Related Sales][Quantity]) + [Initial Stock]

 

It ended up being SUM and list dereference combination

 

[Related Orders][Order Date]

 Many many thanks!!!

-Alvar

Thank you, this really help me

Top Labels in this Space