# Formula not working

**URL:** <https://forum.seatable.com/t/formula-not-working/4956>\
**Category:** Formulas\
**Tags:** date-and-time\
**Created:** [July 24, 2024, 8:35am UTC](https://forum.seatable.com/t/formula-not-working/4956 "2024-07-24T08:35:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kanu\_Haselhorst](https://forum.seatable.com/letter_avatar_proxy/v4/letter/k/ecae2f/32.png) [@Kanu\_Haselhorst](https://forum.seatable.com/u/Kanu_Haselhorst)\
**Post date:** [July 24, 2024, 8:35am UTC](https://forum.seatable.com/t/formula-not-working/4956/1 "2024-07-24T08:35:51Z")

</div>

Hi,

I have following formula:

```auto
IF(
    OR(
        {Austritt-Datum} <= today(), 
        {Verstorben} <= today()
    ), 
    "Nein", 
    "Ja"
)

```

For one data entry {Austritt-Datum} is 31.12.2022, so in the past. The output of the above formula is still “Ja” , but should be “Nein”.

Can someone help out?

---

<div class="post-metadata">

**Author:** ![rdb](https://forum.seatable.com/user_avatar/forum.seatable.com/rdb/32/1869_2.png) [@rdb](https://forum.seatable.com/u/rdb)\
**Post date:** [July 24, 2024, 2:49pm UTC](https://forum.seatable.com/t/formula-not-working/4956/2 "2024-07-24T14:49:55Z")

</div>

Works well here:  
 ![image](https://forum.seatable.io/uploads/default/original/2X/3/36bd512b5877a6ba71c3e40bfe9b3d8bd3c5d4a3.png)

This is my formula:  
 ![image](https://forum.seatable.io/uploads/default/original/2X/1/107e7ef06eea00bffcc7033477c3454f72ebd894.png)

---

<div class="post-metadata">

**Author:** ![Kanu\_Haselhorst](https://forum.seatable.com/letter_avatar_proxy/v4/letter/k/ecae2f/32.png) [@Kanu\_Haselhorst](https://forum.seatable.com/u/Kanu_Haselhorst)\
**Post date:** [July 30, 2024, 8:03am UTC](https://forum.seatable.com/t/formula-not-working/4956/3 "2024-07-30T08:03:30Z")

</div>

Thanks! I found the issue. When the field “Austritt-Datum” is empty, then the formula returns “Ja” even though the field “Verstorben” is in the past. So both fields need to have an input value for it to work.

Is there a way to fix this?

---

<div class="post-metadata">

**Author:** ![cdb](https://forum.seatable.com/user_avatar/forum.seatable.com/cdb/32/7_2.png) [@cdb](https://forum.seatable.com/u/cdb)\
**Post date:** [July 31, 2024, 2:34pm UTC](https://forum.seatable.com/t/formula-not-working/4956/4 "2024-07-31T14:34:24Z")

</div>

You can encapsulate multiple `ifs` together:

```auto
if(a = a, "same value", if(a = b, "another value", "anything else"))

```

I am sure you will find a solution.

---

<div class="post-metadata">

**Author:** ![system](https://forum.seatable.com/uploads/default/original/1X/04603423fe81a46c321283663086c475429e8ccb.png) [@system](https://forum.seatable.com/u/system)\
**Post date:** [August 2, 2024, 2:34pm UTC](https://forum.seatable.com/t/formula-not-working/4956/5 "2024-08-02T14:34:54Z")

</div>

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