Skip to content

Logical Functions

between

Syntaxbetween(ARG,START,END)
Parameters1. Parameter for calculation, any type;
2. Specified start, any type;
3. Specified end, any type
Return TypeBoolean
DescriptionDetermines whether arg is between [start, end]
Examplebetween(5, 1, 10), returns: TRUE

between_ie

Syntaxbetween_ie(ARG,START,END)
Parameter Description1. Parameter for calculation, any type;
2. Specified start, any type;
3. Specified end, any type
Return TypeBoolean
DescriptionDetermines whether arg is within the range (start, end], a left-open and right-closed interval
Examplebetween_ie(5, 5, 10), returns: FALSE (because the left boundary is not included)

case when

Syntaxcase when condition then result1 [else result2] end
Parameter Descriptioncondition is an expression that returns a Boolean value
Return TypeConsistent with the types of result1 and result2
DescriptionThis function outputs based on the return result of the condition expression. When condition is true, it returns result1. When condition is false, it returns result2. The else branch is not mandatory.
Examplecase
when {code} = 2 then 'Excellent'
when {code} = 1 then 'Pass'
else 'Fail'
end

coalesce

Syntaxcoalesce(ARG, REPLACEMENT)
Parameters1. The parameter involved in the calculation, any type;
2. The value used to replace NULL, any type (must be of the same type as the first parameter)
Return TypeANY
DescriptionReplaces NULL values in arg with another value
Examplescoalesce(null, 'default value'), returns: 'default value';
coalesce(123, 0), returns: 123
Unsupported Data SourcesNone

if

Syntaxif(B,TRUE,FALSE)
Parameter Description1. Condition, Boolean type parameter, optional type: Boolean;
2. Value when the condition is true, any type;
3. Value when the condition is false, any type
Return TypeANY
DescriptionConditional branching judgment, the types of the last two parameters must be the same.
Exampleif({score}>=60, 'Pass', 'Fail'), returns: a corresponding string based on the value of the score field

in

Syntaxin(ARG, ARR)
Parameters1. Parameter involved in calculation, any type;
2. Array type parameter, optional type: ARRAY
Return TypeBoolean
DescriptionWhether the value of the field is in the list
Examplein('apple', ['banana', 'apple']), returns: TRUE

isnull

Syntaxisnull(ARG)
ParameterThe parameter involved in the calculation, any type
Return TypeBoolean
DescriptionDetermines whether the specified field is null
Exampleisnull(null), returns: TRUE

isnotnull

Syntaxisnotnull(ARG)
ParameterThe parameter involved in the calculation, any type
Return TypeBoolean
DescriptionDetermines whether the specified field is not null
Exampleisnotnull('test'), returns: TRUE

not_between

Syntaxnot_between(ARG,START,END)
Parameter Description1. Parameter for calculation, any type;
2. Specified start, any type;
3. Specified end, any type
Return TypeBoolean
DescriptionDetermines whether arg is outside [start, end]
Examplenot_between(5, 1, 10), returns: FALSE

notin

Syntaxnotin(ARG,ARR)
Parameter Description1. Parameter involved in calculation, any type;
2. Array type parameter, optional type: ARRAY
Return TypeBoolean
DescriptionChecks whether the value of the field is outside the list
Examplenotin('apple', ['banana', 'apple']), returns: FALSE

User Manual for Hengshi Analysis Platform