# Help with math table

**URL:** <https://community.glideapps.com/t/help-with-math-table/36149>\
**Category:** Ask for Help\
**Created:** [December 20, 2021, 11:45pm UTC](https://community.glideapps.com/t/help-with-math-table/36149 "2021-12-20T23:45:53Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 20, 2021, 11:45pm UTC](https://community.glideapps.com/t/help-with-math-table/36149/1 "2021-12-20T23:45:53Z")

</div>

In google sheet i use this.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/d/fdcd05a4f971288f9a18c50b755a6596412c1e39.png)

how would i be able to do 1 a simple math.  
= sum(sumproduct($C$7,$D$7,$E$7)_$D$1%)  
Sum(25_2, \*50%)  
{Price \* q} \* 50%  
25 \* 2 \* 50%

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

This shouldn’t be rocket since. I am sure glide has this implemented already?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 20, 2021, 11:48pm UTC](https://community.glideapps.com/t/help-with-math-table/36149/2 "2021-12-20T23:48:31Z")

</div>

multiply by 0.5… or 50/100… if you use 50% as variable

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 20, 2021, 11:50pm UTC](https://community.glideapps.com/t/help-with-math-table/36149/3 "2021-12-20T23:50:50Z")

</div>

Thank you for the fast response. Very easy.

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 21, 2021, 12:07am UTC](https://community.glideapps.com/t/help-with-math-table/36149/4 "2021-12-21T00:07:14Z")

</div>

> [@Uzo](#):
>
> 50/100

What about q \* price - q \* cost \* Selected/100  
=sum({sumproduct(C23,D23,E23)-sumproduct(C23,D23,L23)}\*$D$1%)  
=sum({sumproduct(100,2)-sumproduct(50,2)}\*50%)

Seems as the math is off.

**Update: (q1\*price - q2 \* cost) \* (Selected/100)**

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 21, 2021, 12:43am UTC](https://community.glideapps.com/t/help-with-math-table/36149/5 "2021-12-21T00:43:37Z")

</div>

Keep in mind math order of operations (PEMDAS). If Price-Q2 is supposed to be calculated before being multiplied with the other numbers, then it should be in parenthesis so it’s calculated first. Otherwise you can get very different results.

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 21, 2021, 12:48am UTC](https://community.glideapps.com/t/help-with-math-table/36149/6 "2021-12-21T00:48:36Z")

</div>

Can you give me on example of a If Price-Q2 Like if Checked etc…

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 21, 2021, 12:51am UTC](https://community.glideapps.com/t/help-with-math-table/36149/7 "2021-12-21T00:51:23Z")

</div>

(q1\*(price - q2) \* cost) \* (Selected/100)

I don’t know if that matches what you want your math to do, but that would be my first guess. Math inside parenthesis is always done first.

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 21, 2021, 12:54am UTC](https://community.glideapps.com/t/help-with-math-table/36149/8 "2021-12-21T00:54:13Z")

</div>

Do we know if we can do somthing like this?

If (e|d = true) income - your profit

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/3/13ed8b2bfb5e7bdd582eecb0cdd069bbea18668d.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 21, 2021, 12:57am UTC](https://community.glideapps.com/t/help-with-math-table/36149/9 "2021-12-21T00:57:27Z")

</div>

No you can’t combine math and if logic in a single column. (You can if you get really creative, but it’s almost impossible to explain the process of how I have done it). Instead, have an IF column return a number, else 1, or 0, or whatever the alternative number should be. Then incorporate that returned IF value in your math column.

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 21, 2021, 1:29am UTC](https://community.glideapps.com/t/help-with-math-table/36149/10 "2021-12-21T01:29:47Z")

</div>

Ok i have a col with if 0,1 now how do i impalement it?

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 21, 2021, 1:39am UTC](https://community.glideapps.com/t/help-with-math-table/36149/11 "2021-12-21T01:39:26Z")

</div>

you have to create two math columns for true and false, then use if-else column to bring up the right math

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 21, 2021, 1:48am UTC](https://community.glideapps.com/t/help-with-math-table/36149/12 "2021-12-21T01:48:06Z")

</div>

@Jeff_Hager is saying it can be done in the math section.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/6/c6a4d105e9b5eb1158485300baaa658515a4b2b2.png)

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 21, 2021, 1:50am UTC](https://community.glideapps.com/t/help-with-math-table/36149/13 "2021-12-21T01:50:51Z")

</div>

what he is saying is the same as what I said, but reverse… he is first IF-Else the problem and then do the math…

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 21, 2021, 1:52am UTC](https://community.glideapps.com/t/help-with-math-table/36149/14 "2021-12-21T01:52:19Z")

</div>

I would like to do the if else and then the math since i have alot of math col.

---

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [December 21, 2021, 1:53am UTC](https://community.glideapps.com/t/help-with-math-table/36149/15 "2021-12-21T01:53:30Z")

</div>

if you have a lot… then I would recommend doing it my way… you gonna get lost in if-else first

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 21, 2021, 1:55am UTC](https://community.glideapps.com/t/help-with-math-table/36149/16 "2021-12-21T01:55:24Z")

</div>

I already had it your way. i will just revers it.

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 21, 2021, 2:52am UTC](https://community.glideapps.com/t/help-with-math-table/36149/17 "2021-12-21T02:52:33Z")

</div>

OK perfect got it all working. Last but not least Q. How do i sum a col into a single value?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/2/321fa7ef6fa241edfb452d203b972a69058aaec5.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:** [December 21, 2021, 3:05am UTC](https://community.glideapps.com/t/help-with-math-table/36149/18 "2021-12-21T03:05:20Z")

</div>

With a rollup column.

---

<div class="post-metadata">

**Author:** ![abe.sherman](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abe.sherman/32/11260_2.png) [@abe.sherman](https://community.glideapps.com/u/abe.sherman)\
**Post date:** [December 21, 2021, 3:07am UTC](https://community.glideapps.com/t/help-with-math-table/36149/19 "2021-12-21T03:07:46Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/d/4d5fc42f4869f8f4d20a3fd60bb0f5b5a964c73c.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:** [December 21, 2021, 3:13am UTC](https://community.glideapps.com/t/help-with-math-table/36149/20 "2021-12-21T03:13:33Z")

</div>

That looks like you’re doing a count. I thought you wanted a sum?

[Next page](https://community.glideapps.com/t/help-with-math-table/36149.md?page=2)
