Applies to: CELONIS 4.7
Description
MULTI_IN
returns true for all cases one or multiple columns that match any tuple of the
match list. Returns false otherwise. The reverse is true for NOT MULTI_IN
.
Syntax
MULTI_IN ( (table.column, ...), (value1_1, ...), (value2_1, ...), ...)
NOT MULTI_IN ( (table.column, ...), (value1_1, ...), (value2_1, ...), ...)
Supported types
Supported value types for the match list are STRING, INT, FLOAT, DATE.
Usage
MULTI_IN
can be used in the following contexts:
- CASE WHEN (in the
WHEN
conditions) - FILTER
- Pull-Up-Functions (in the filter argument)
- BIND_FILTERS (in the filter argument)
- CALC_REWORK (in the filter argument)
Null handling
A match value can also be NULL. A NULL value matches with all cases of a column that are NULL.
Case sensitivity
Comparison of strings is case-sensitive.
Examples
[3] Column contains only integers and the tuples contain floats and integers.
If a float and an integer represent the same value they match.
Query
Column1
CASE WHEN MULTI_IN ( ( "Table1"."Column1" , "Table1"."Column2" ) , ( 5.0 , 6 ) , ( 1 , 2 ) , ( 3.001 , 4 ) , ( 7.0 , 8.0 ) ) THEN 1 ELSE 0 END
[4]
MULTI_IN
with dates and strings.
Query
Column1
CASE WHEN MULTI_IN ( ( "Table1"."Column1" , "Table1"."Column2" ) , ( {t 946771200000 } , 'AA' ) , ( {t 1009756800000 } , 'AA' ) , ( {t 1245145600000 } , 'AA' ) ) THEN "Table1"."Column1" ELSE null END
[5] NULL values in a column match against NULL values in the tuples.
Query
Column1
CASE WHEN MULTI_IN ( ( "Table1"."Column1" , "Table1"."Column2" ) , ( 1 , 'A' ) , ( 3 , NULL ) , ( 4 , 'D' ) , ( NULL , NULL ) ) THEN 1 ELSE 0 END