The condition to check.
The value to return if the condition is TRUE.
An additional condition to check.
An additional value to return if the preceding condition is TRUE.
The value associated with the first condition which is TRUE (evaluated from left to right). If no condition is TRUE, a blank value is returned.
Returns one of the given values based on logical conditions. IFS(Field1 > 20, 2, Field2 > 40, 4, TRUE, 6)IFS(Field1 > 20; 2; Field2 > 40; 4; TRUE; 6) returns 2 if Field1 has a value greater than 20, 4 if Field1 does not have a value greater than 20 and Field2 has a value greater than 40, and 6 otherwise.
IFS is mostly identical to IF, with the sole difference being that IFS does not support a fallback value, that is, a value that is returned if no condition evaluates to TRUE. As such, the equivalent to IF(Field1 > 20, 2, Field2 > 40, 4, 6)IF(Field1 > 20; 2; Field2 > 40; 4; 6) is IFS(Field1 > 20, 2, Field2 > 40, 4, TRUE, 6)IFS(Field1 > 20; 2; Field2 > 40; 4; TRUE; 6)—note that the final condition is TRUE, enabling a fallback value to be used with IFS.
IFS is provided for compatibility with spreadsheets. Use the plain IF function if spreadsheet-compatibility is not a concern. Also, refer to the documentation for IF for an extended discussion and many more examples.