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

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!

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

1 Like

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

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

1 Like

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).

2 Likes

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

1 Like

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