Amazon QuickSight
User Guide

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.


nullIf compares two expressions. If they are equal, the function returns null. If they are not equal, the function returns the first expression.


nullIf(expression1, expression2)


nullIf takes two expressions as arguments.


The expression can be numeric, datetime, or string. It can be a field name, a literal value, or another function.

Return Type



The following example returns nulls if the reason for a shipment delay is unknown.

nullIf(delayReason, 'unknown')

The following are the given field values.

delayReason ============ unknown back ordered weather delay

For these field values, the following values are returned.

(null) back ordered weather delay