# How to have choices change math equation. (w/ pic)

**URL:** <https://community.glideapps.com/t/how-to-have-choices-change-math-equation-w-pic/62412>\
**Category:** Ask for Help\
**Created:** [June 3, 2023, 10:50am UTC](https://community.glideapps.com/t/how-to-have-choices-change-math-equation-w-pic/62412 "2023-06-03T10:50:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamieErvin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jamieervin/32/57900_2.png) [@JamieErvin](https://community.glideapps.com/u/JamieErvin)\
**Post date:** [June 3, 2023, 10:50am UTC](https://community.glideapps.com/t/how-to-have-choices-change-math-equation-w-pic/62412/1 "2023-06-03T10:50:24Z")

</div>

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

How do I get the choice of one column to affect the math in another?

How do I properly execute that? Does that happen in an “Ïf then Else” column somehow or a math equation with some type of syntax? How (and where) would I create that?

ex: If VERT SPRD TYPE is PCS then BPEFFCT is XY-Z else if VERTY SPRD TYPE is CCS then BPEFFECT is XY+Z

Thank you!

---

<div class="post-metadata">

**Author:** ![Petr\_Shemyagin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/petr_shemyagin/32/59902_2.png) [@Petr\_Shemyagin](https://community.glideapps.com/u/Petr_Shemyagin)\
**Post date:** [June 3, 2023, 11:02am UTC](https://community.glideapps.com/t/how-to-have-choices-change-math-equation-w-pic/62412/2 "2023-06-03T11:02:01Z")

</div>

I think one of the most straightforward options is to make 3 different math columns for each of the choice. And after that get the final result using the if-the-else column that will be like:

- if choice is A =\> show the result of first math column
- if choice is B =\> show the result of second math column  
…

That looks quite reqlistic and easy if you only have 3 options

---

<div class="post-metadata">

**Author:** ![Petr\_Shemyagin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/petr_shemyagin/32/59902_2.png) [@Petr\_Shemyagin](https://community.glideapps.com/u/Petr_Shemyagin)\
**Post date:** [June 3, 2023, 11:04am UTC](https://community.glideapps.com/t/how-to-have-choices-change-math-equation-w-pic/62412/3 "2023-06-03T11:04:32Z")

</div>

So, each math column will independently calculate it’s own result, but you will use if-then-else to choose which of the results to use after

---

<div class="post-metadata">

**Author:** ![JamieErvin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jamieervin/32/57900_2.png) [@JamieErvin](https://community.glideapps.com/u/JamieErvin)\
**Post date:** [June 3, 2023, 11:56am UTC](https://community.glideapps.com/t/how-to-have-choices-change-math-equation-w-pic/62412/4 "2023-06-03T11:56:37Z")

</div>

Awesome! I’ll get to work on it asap! Thanks a million.

---

<div class="post-metadata">

**Author:** ![MatthewS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matthews/32/40533_2.png) [@MatthewS](https://community.glideapps.com/u/MatthewS)\
**Post date:** [June 4, 2023, 12:07am UTC](https://community.glideapps.com/t/how-to-have-choices-change-math-equation-w-pic/62412/5 "2023-06-04T00:07:04Z")

</div>

If you need different equations, then math column for each option, and finish with an if-then-else would be good as Petr suggested. Though if, and as in your example, the equation is the same and you just need one value changed, I’d do one if-then-else and one math column.

So you have your choice column. Then you have an if-then-else column that gives a different result for each option from the choice column, and then one math column. In your example, the if-then-else would give -Z for choice PCS, and just Z for option CCS, and then your math column would be XY+(result of if-then-else).

---

<div class="post-metadata">

**Author:** ![JamieErvin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jamieervin/32/57900_2.png) [@JamieErvin](https://community.glideapps.com/u/JamieErvin)\
**Post date:** [June 6, 2023, 12:07pm UTC](https://community.glideapps.com/t/how-to-have-choices-change-math-equation-w-pic/62412/6 "2023-06-06T12:07:45Z")

</div>

Thanks MatthewS, I appreciate the explanation. I set it up as you instructed and it works! Much appreciated!

---

<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:** [June 7, 2023, 12:08pm UTC](https://community.glideapps.com/t/how-to-have-choices-change-math-equation-w-pic/62412/7 "2023-06-07T12:08:19Z")

</div>

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