For the latest version of JMP Help, visit JMP.com/help.


Publication date: 11/29/2021

Comparison Functions

You can create a formula that compare the values of two arguments by using the comparison function. Each comparison relationship evaluates as true or false based on numeric magnitudes or character rankings. A true relationship evaluates as one, and false evaluates as zero.

Comparisons are useful when you include them in conditional expressions, but they can also stand alone as numeric expressions if neither term in comparison is missing. A relational symbol’s arguments can be any two expressions. However, both arguments in a comparison function must be of the same data type. Also note that:

JMP displays an error if you use a single “=” in a conditional where “==” is expected.

The Formula Editor uses the International Utilities package when comparing character strings. This package contains different rankings for each international character set and takes diacritical marks into consideration.

You should not use comparison operators to specifically compare to a missing value. Instead, use the Is Missing function to detect a missing value.

See Comparison Functions in the JSL Syntax Reference for more information about syntax.

<

Less than

>

Greater than

<=

Less than or equal to

>=

Greater than or equal to

==

Equal to

!=

Not equal to

a<b<=c

b is greater than a and less than or equal to c

a<=b<c

b is greater than or equal to a and less than c

Is Missing

Returns a one (1) if the value of the argument for the current row is missing, and a zero if the value is not missing.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).