Help

Subtract more than one item from the same product

Solved
Jump to Solution
3283 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Arturo_Ayala
4 - Data Explorer
4 - Data Explorer

I am running a store that makes fabric bags. Each bag can be made from one or more products from the inventory, for example, two zippers, one strap, one tag, two hooks, etc. I need a formula that for each bag I sell it can subtract more than one item from each product in the inventory, this is kind of a cooking recipe. Please let me know if you need further information.

Thank you!

1 Solution

Accepted Solutions
JonathanBowen
13 - Mars
13 - Mars

Hi @Arturo_Ayala - this is how I would approach this base design:

I would have 4 tables:

  • Products - the bags
  • Components - the zipper, the strap etc
  • Product Compositions - The linking of components with products
  • Orders - orders of products

Have a look at this base that I’ve mocked up:

The Products and Components tables are pretty straightforward. The Product Compositions records the components (and quantities of each) that go to make up a single bag:

Screenshot 2019-05-10 at 18.53.39.png

So, Bag 1 has 2 zips, 1 Strap, 2 Hooks and so on. This might look like overkill at first glance, but I think it facilitates the solution you are after.

Orders records sales of each item (maybe with other order data like date, customer etc):

Screenshot 2019-05-10 at 18.54.47.png

Now, back in the Products table you can see the link to orders and then do a count of Quantity Sold:

Screenshot 2019-05-10 at 18.55.43.png

In the Product Compositions table you can lookup the product quantity sold and work out the total number of components sold based on the quantity per product (composition) and the quantity sold:

Screenshot 2019-05-10 at 18.57.04.png

Finally, in the Components table you can record your opening (or total) inventory received, do a roll-up of the total inventory sold and take these two away to get the total remaining inventory:

Screenshot 2019-05-10 at 18.59.22.png

Now, as items are recorded in the Orders table, the Total Inventory Sold and Remaining Inventory will increment and decrement appropriately.

As you take in more inventory - say another 100 zips, you update the Opening inventory field to be 200 zips, i.e. the total received over all time.

This is probably a simplified version of what you might have already but hopefully points you in the right direction to keep your inventory updated.

JB

See Solution in Thread

4 Replies 4
JonathanBowen
13 - Mars
13 - Mars

Hi @Arturo_Ayala - this is how I would approach this base design:

I would have 4 tables:

  • Products - the bags
  • Components - the zipper, the strap etc
  • Product Compositions - The linking of components with products
  • Orders - orders of products

Have a look at this base that I’ve mocked up:

The Products and Components tables are pretty straightforward. The Product Compositions records the components (and quantities of each) that go to make up a single bag:

Screenshot 2019-05-10 at 18.53.39.png

So, Bag 1 has 2 zips, 1 Strap, 2 Hooks and so on. This might look like overkill at first glance, but I think it facilitates the solution you are after.

Orders records sales of each item (maybe with other order data like date, customer etc):

Screenshot 2019-05-10 at 18.54.47.png

Now, back in the Products table you can see the link to orders and then do a count of Quantity Sold:

Screenshot 2019-05-10 at 18.55.43.png

In the Product Compositions table you can lookup the product quantity sold and work out the total number of components sold based on the quantity per product (composition) and the quantity sold:

Screenshot 2019-05-10 at 18.57.04.png

Finally, in the Components table you can record your opening (or total) inventory received, do a roll-up of the total inventory sold and take these two away to get the total remaining inventory:

Screenshot 2019-05-10 at 18.59.22.png

Now, as items are recorded in the Orders table, the Total Inventory Sold and Remaining Inventory will increment and decrement appropriately.

As you take in more inventory - say another 100 zips, you update the Opening inventory field to be 200 zips, i.e. the total received over all time.

This is probably a simplified version of what you might have already but hopefully points you in the right direction to keep your inventory updated.

JB

This looks like an excellent solution. My only addition would be another table to track components as they come in. Instead of manually entering the number of available components into the components table, make it a rollup from the incoming supplies table. Then add a field in the Components table that takes the total of everything that has come in and subtracts everything that has been used, which leaves the available component count.

I have a base in Universe that models this exact workflow
(supply → components → products → stock → sales)
but in the context of Jewelry. It could easily be modified to extend to this use case as well.

Yes, good idea. Inbound inventory is like a “reverse order” so new records in an inventory table rolls-up to the total inventory received

JB