# Math across different tables

**URL:** https://community.glideapps.com/t/math-across-different-tables/79336
**Category:** Ask for Help
**Created:** [January 19, 2025, 1:38am UTC](https://community.glideapps.com/t/math-across-different-tables/79336 "2025-01-19T01:38:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![inneedofhelp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/inneedofhelp/32/84129_2.png) [@inneedofhelp](https://community.glideapps.com/u/inneedofhelp)
#### Post date: [January 19, 2025, 1:38am UTC](https://community.glideapps.com/t/math-across-different-tables/79336/1 "2025-01-19T01:38:03Z")

</div>

I’m trying to figure out how to calculate the qty of a specific barcode.

Table #1 has a column with total qty with a specific barcode.  
Table #2 has stock movement (+1 or -1 attached to a specific barcode, on a row )

How do I get the “total qty” to tally up the numbers from Table #2 using the barcode and qty #?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [January 19, 2025, 1:47am UTC](https://community.glideapps.com/t/math-across-different-tables/79336/2 "2025-01-19T01:47:26Z")

</div>

Any chance you can provide a screen shot of both tables, just to help to better visualise?

---

<div class="post-metadata">

### Author: ![inneedofhelp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/inneedofhelp/32/84129_2.png) [@inneedofhelp](https://community.glideapps.com/u/inneedofhelp)
#### Post date: [January 19, 2025, 1:49am UTC](https://community.glideapps.com/t/math-across-different-tables/79336/3 "2025-01-19T01:49:48Z")

</div>

Table #1 - Ingredients

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/e/bec0b41b8516a04c4c95d067a7ee8e263b0dcdc2.png)

Table #2 - Stock Movement

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/7/a7bb353c0e18b990a92a7c9c741f80ca7cbe6896.png)

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [January 19, 2025, 1:52am UTC](https://community.glideapps.com/t/math-across-different-tables/79336/4 "2025-01-19T01:52:05Z")

</div>

Okay, thanks.

- In the first table, create a multiple relation column, matching the Barcode # with the Barcode in the second table
- Then add a Rollup column, that takes a sum of QTY via the relation column

---

<div class="post-metadata">

### Author: ![inneedofhelp](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/inneedofhelp/32/84129_2.png) [@inneedofhelp](https://community.glideapps.com/u/inneedofhelp)
#### Post date: [January 19, 2025, 2:32am UTC](https://community.glideapps.com/t/math-across-different-tables/79336/5 "2025-01-19T02:32:14Z")

</div>

Thank you so much! 🙏

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [January 26, 2025, 2:32am UTC](https://community.glideapps.com/t/math-across-different-tables/79336/6 "2025-01-26T02:32:54Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
