# Logical Functions

> Use mathematical functions in custom tables and fields.

*Source: https://docs.sisense.com/main/SisenseLinux/logical-functions.htm*

---

|  |  |
| --- | --- |
| [Tier](https://www.sisense.com/pricing/#pricing) | [Deployment](https://docs.sisense.com/main/SisenseLinux/introduction-to-sisense-cloud-managed-services.md#ComparisonofManagedCloudandSelfHosted) |
| Launch     Grow    Enterprise | Cloud     On-Prem |

You can use mathematical functions in custom tables and fields. See [Adding Custom Tables](https://docs.sisense.com/main/SisenseLinux/adding-a-custom-table.md) and [Defining and Editing Field Formulas](https://docs.sisense.com/main/SisenseLinux/editing-field-formulas.md) for
further details.

Following are descriptions for the available logical functions:

**IFBIGINT(condition, true value, false value)**
  
Returns the first value if the Boolean evaluate is true, else returns the second value.

**IFDATETIME(condition, true value, false value)**
  
Returns the first value if the Boolean evaluate is true, else returns the second value.

**IFDOUBLE(condition, true value, false value)**
  
Returns the first value if the Boolean evaluate is true, else returns the second value.

**IFINT(condition, true value, false value)**
  
Returns the first value if the Boolean evaluate is true, else returns the second value.

**IFSTRING(condition, true value, false value)**
  
Returns the first value if the Boolean evaluate is true, else returns the second value.

**INRANGE(value, start, end)**
  
Returns true if a given value is between start and end.

**ISNULL(value)**
  
Returns true if a given value is null.

**LOOKUP(remote\_table,remote\_result\_column,current\_match\_column, remote\_match\_column)** The Lookup
function imports a field from a remote table into the current table, by matching the values of current\_match\_column
and remote\_match\_column, and importing the value from remote\_result\_column. When there is no match between the fields,
the returned value is 'N\A'.

**Note:**

The LOOKUP function:

- Is only for defining custom columns. It cannot be used for custom tables.
- Is not supported if the data source does not support the function natively when using a live model.

The following is a video demonstration of the Lookup function.
