# Conditional Equations, leave value empty for last ternary operator

**URL:** <https://forums.knack.com/t/conditional-equations-leave-value-empty-for-last-ternary-operator/6787>\
**Category:** Get Answers\
**Created:** [March 13, 2019, 12:00am UTC](https://forums.knack.com/t/conditional-equations-leave-value-empty-for-last-ternary-operator/6787 "2019-03-13T00:00:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimLohnes65432](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@TimLohnes65432](https://forums.knack.com/u/TimLohnes65432)\
**Post date:** [March 13, 2019, 12:00am UTC](https://forums.knack.com/t/conditional-equations-leave-value-empty-for-last-ternary-operator/6787/1 "2019-03-13T00:00:43Z")

</div>

I am using a conditional equation to only figure out % if there are values to figure out. I don't want 0% in all the rows, I just want it figured where there are numbers to work with.

**LOGIC**

If {Decision Rent Increase} exists, then figure out the % increase, otherwise I want to leave blank/empty. I can put '0', but I would prefer nothing. It errors if you don't add the last operator.

**CODE**

{Decision Rent Increase} \> 0 ? ({Base Rent} + {Decision Rent Increase} + {Reduced Services Value} - {Base Rent}) / {Base Rent} : 0

What am I forgetting to try? Any solutions.

Thanks,  
Tim

---

<div class="post-metadata">

**Author:** ![TimLohnes65432](https://avatars.discourse-cdn.com/v4/letter/t/ecb155/32.png) [@TimLohnes65432](https://forums.knack.com/u/TimLohnes65432)\
**Post date:** [March 13, 2019, 5:01pm UTC](https://forums.knack.com/t/conditional-equations-leave-value-empty-for-last-ternary-operator/6787/2 "2019-03-13T17:01:42Z")

</div>

Oh yes, simplicity. I forgot it isn't necessarily about what I see behind the scenes in Builder, but we can tailor what users see.

That works. It looks a little odd to me that a bunch of rent fields show up, the proposed rent info, but the rest when a decision is made don't show up. Looks a little like an error to me, but if I train folks that if it isn't there, it doesn't exist yet. Should be fine.

Thanks.

---

<div class="post-metadata">

**Author:** ![BradStevens](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/bradstevens/32/140_2.png) [@BradStevens](https://forums.knack.com/u/BradStevens)\
**Post date:** [March 13, 2019, 9:45am UTC](https://forums.knack.com/t/conditional-equations-leave-value-empty-for-last-ternary-operator/6787/3 "2019-03-13T09:45:29Z")

</div>

Maybe it's simpler Tim?

1. Set the equation without the conditional test: ({Base Rent} + {Decision Rent Increase} + {Reduced Services Value} - {Base Rent}) / {Base Rent}
2. Set the field to not display when the result is zero in table and detail views.

---

<div class="post-metadata">

**Author:** ![Nick](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Nick](https://forums.knack.com/u/Nick)\
**Post date:** [October 5, 2023, 8:15pm UTC](https://forums.knack.com/t/conditional-equations-leave-value-empty-for-last-ternary-operator/6787/4 "2023-10-05T20:15:33Z")

</div>

@BradStevens I’m trying to figure out the equation where it does not enter a 0 as the value when the other fields are empty. Any ideas? Thank you.

---

<div class="post-metadata">

**Author:** ![BradStevens](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.knack.com/bradstevens/32/140_2.png) [@BradStevens](https://forums.knack.com/u/BradStevens)\
**Post date:** [October 5, 2023, 9:31pm UTC](https://forums.knack.com/t/conditional-equations-leave-value-empty-for-last-ternary-operator/6787/5 "2023-10-05T21:31:46Z")

</div>

@Nick it’s in the view settings not in the equation.
