# Why does my equation return blank when a field is empty?

> Empty number fields count as 0, but an empty text or date field can blank the whole result. Test it with IF, or join text with CONCAT_WS.

Source: https://tadabase.com/docs/faq/why-is-my-equation-blank  
Status: Verified Nov 22, 2026. Checked against the current product

Empty number fields count as 0 in an equation, but an empty text or date field has no value, and functions such as `CONCAT` and `DATEDIFF` then return nothing for the whole record. Test the field with `IF` and give a default, or join text with `CONCAT_WS`, which leaves out parts that have no value.

## Examples

| You want | Equation |
| --- | --- |
| Days until the due date, or a note when there is none (Text output) | `IF({Due Date} IS NULL, 'No due date', DATEDIFF({Due Date}, CURDATE()))` |
| A full name that still works without a middle name | `CONCAT_WS(' ', {Name - First Name}, {Name - Middle Name}, {Name - Last Name})` |
| A text field with a fallback | `IF({Reference} IS NULL OR {Reference} = '', 'none', {Reference})` |

Number, Currency, Rating, Slider, Number Formula and number Equation fields are already read as 0 when empty, so `{Price} * {Quantity}` gives 0 instead of blank. `IFNULL` and `COALESCE` are not in the editor's function list; use `IF` instead. Every accepted function is in [Equation functions and examples](https://tadabase.com/docs/data/equation-functions).
