Amazon QuickSight – isNotNull
In Amazon QuickSight, the isNotNull function is used to check if an expression is not null.
Syntax
#Start# isNotNull(expression) #End#
This function takes one argument
- expression: This parameter can be any valid QuickSight expression that returns a value. This can be a field reference, a constant, a function call, or any combination of these.
Suppose you have a dataset that includes a Product field, and you want to filter the data to include only records where the Product field is not null. To do this, you could create a filter using the isNotNull function as follows
- Open the analysis in QuickSight and choose the visual that you want to add the filter.
- In the Visual pane, choose the Filters icon to open the Filters pane.
- Choose the Add Filter button to add a new filter.
- In the Fields section, choose the Product field.
- In the Filter type section, choose Custom.
- In the Custom filter section, enter the following expression.
Example
#Start# isNotNull({Product}) #End#
- Choose the Apply button to apply the filter.
This will filter the data to include only records where the Product field is not null. You can use the isNotNull function in combination with other functions like ifelse or sum to perform more complex calculations or filters based on non-null values.