Ticket #31324
Question
When I created a simple calculation that uses three fields from three different tables. It appears the calculation only works (evaluates to something) when it finds a match in all three tables.
Answer
Understand that having a NULL value in any database arithmetic results in the output being NULL. You should use COALESCE() in the calculation expression to tell the database what to do with any NULL values it may encounter from your fields, such as to replace them with '0' prior to performing the arithmetic. This will ensure the result is not NULL.
Asked on April 6, 2021