# Using Conditional Statements

> Conditional statements are formulas that enable you to create additional categories in your data set. When the condition is met, the new category is added to your visualization without modifying the data source itself.

*Source: https://docs.sisense.com/main/SisenseLinux/conditional-statements.htm*

---

Last updated: June 11, 2026

|  |  |
| --- | --- |
| [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 |

Conditional statements are formulas that enable you to create additional categories in your data set. When the
condition is met, the new category is added to your visualization without modifying the data source itself.

For example, if you want to calculate only certain values according to conditions you define, you can use a
conditional statement to include only the values of interest.

Sisense provides several conditional statements that enable you to evaluate criteria and display only the relevant
results in your dashboard.

**Note:**

Conditional states work on measures and aggregations only and return numeric values.

## IF

`IF (Boolean_expression, true value, false value)`

Evaluates a Boolean expression and returns the first value when evaluated as true, and returns the second value
when evaluated as false.

**For example:**

`(if(Sum(Sales) > 10, 0, Sum(Sales) )`

Nested IF statements are also supported.

**For example:**

`if (Sum(Sales) > 100 , 1 ,(if (Sum(Sales) > 1000 , 2, 3) )`

## isNull

`ISNULL (<numeric value>)`

Returns true if the expression doesn't contain data (Null). Can be used as a condition when writing conditional
statements.

**For example:**

`If (ISNULL(sum(deals)), 0, sum(deals) )`

## Case

`CASE`
  
`WHEN Boolean_expression THEN result_expression`
  
`[ ... ]`
  
`[ ELSE else_result_expression ]`
  
`END`

The CASE function evaluates Boolean expressions. When the expression evaluates to true, the result\_expression is
returned. If no match is found, the else\_result\_expression is returned. If no default is returned and no values
match, then Null is returned.

**Note:**

When an arithmetic statement is used in conditions, the condition must be on an aggregation.
  
For example:
  
Count[CategoryId] > 1
  
Sum[CategoryId] > 1

[CategoryId] > 1 is not supported.

**For example:**

`CASE`
  
`WHEN Sum(Sales) < 100 THEN 1`
  
`WHEN Sum(Sales) < 1000 THEN 2`
  
`ELSE 3`
  
`END`
