The function calculation format has explained the calculation composition and basic calculation syntax of the function used in FineBI, but sometimes users will encounter the problem of writing formula errors. You can write the formula correctly according to the prompts.
This article will introduce the syntax of operators and expressions in detail to help users understand FineBI's formula verification scheme and write the required functions correctly and effectively.
There is a text field in the parameter, and the result is a text field
Date + value is the date field
If all are numeric, then it is numeric field
Illegal prompt: "Does not support the date+date operation", as shown in the following figure:
Two numeric type or two date type fields
Note: numeric field - date field is not supported.
Date type - date type returns a timestamp.
Date type - numeric type. The returned result is date type.
The rest of the returned results are numeric.
Illegal prompt:
"Does not support numeric-date operation", as shown in the following figure:
Other illegal subtraction: "Text cannot be used as a minus or minus", as shown in the following figure:
Two numeric type parameters
Value type
Illegal prompt: "both ends of the operator / must be numeric type", as shown in the following figure:
The * operator represents the multiplication of numbers.
The % operator returns the remainder.
The ^ operator calculates the specified power of a number
Illegal prompt: "both ends of the operator must be numeric type", as shown in the following figure:
>(greater than)
<(less than)
>=(greater than or equal to)
<=(less than or equal to)
Two parameters of the same type
Boolean type
Illegal prompt: "the field types at both ends of the operator must be the same", as shown in the following figure:
For the function expressions of FineBI, see file: Expression syntax.
When the user make the following writing mistakes, the error message will appear.
For example, if the user writes the following expression: ABS(Total residence time)+, the error "Syntax error, missing identifier" will be reported:
For example, you need to add a new column, all of which are assigned as 1. At this time, enter "1. Due to the lack of half of English double quotation marks, the following error "Character error" will appear:
Other syntax errors.
LEN
Value
"LEN: does not meet the parameter requirements of (any type)"
CHAR
Text
"CHAR: does not meet the parameter requirements of (number)"
CODE
value
"CODE: does not meet (text) parameter requirements"
REPLACE
"REPLACE: does not meet the parameter requirements of (any type, any type, any type) or (any type, value, value, any type)"
STARTWITH
bool
"STARTWITH: does not meet the parameter requirements of (any type, any type)"
ENDWITH
"ENDWITH: does not meet the parameter requirements of (any type, any type)"
EXACT
"EXACT: does not meet the parameter requirements of (any type, any type)"
INDEXOF
"INDEXOF: does not meet the parameter requirements of (any type, value)"
REPEAT
"REPEAT: does not meet the parameter requirements of (any type, value)"
LEFT
"LEFT: does not meet the parameter requirements of (any type) or (any type, value)"
RIGHT
"RIGHT: does not meet the parameter requirements of (any type) or (any type, value)"
TODOUBLE
"TODOUBLE: does not meet the parameter requirements of (any type)"
TOINTEGER
"TOINTEGER: does not meet the parameter requirements of (any type)"
LOWER
"LOWER: does not meet the parameter requirements of (text)"
TRIM
"TRIM: does not meet the parameter requirements of (text)"
UPPER
"UPPER: does not meet the parameter requirements of (text)"
CONCATENATE
"CONCATENATE: does not meet the parameter requirements of (any type...)"
MID
"MID: does not meet the parameter requirements of (any type, value, value)"
REGEXP
BOOL
Real-time data: "REGEXP: does not meet the (text, text) parameter requirements"
Extract data: "REGEXP: does not meet the (text, text) or (text, text, value) parameter requirements"
FORMAT
Real-time data: "FORMAT: does not meet the parameter requirements of (date, text)"
Extract data: "FORMAT: does not meet the parameter requirements of (any type, text)"
FIND
"FIND: does not meet the parameter requirements of (any type, any type) or (any type, any type, value)"
"Does not meet the parameter requirements of (date/text, value)"
"Does not meet the (date/text) parameter requirements"
Real-time data: "DAYSOFYEAR: does not meet the (date/text) parameter requirements"
Extract data: "DAYSOFYEAR: does not meet the (any type...) parameter requirements"
"#Function name#: does not meet the parameter requirements of () or (date/text) or (date/text, text)"
Real-time data: "TIME: does not meet the parameter requirements of (value, value, value)"
Extract data: "TIME: does not meet the parameter requirements of (value/text, value/text, value/text)"
TODATE
Real-time data:"TODATE: does not meet the parameter requirements of (any type) or (text, text)"
Extract data: "TODATE: does not meet the parameter requirements of (any type) or (text, text) or (text, text, text)"
"DAYS360: does not meet the parameter requirements of (date/text, date/text, text/value)"
Note: real-time data does not support this function.
"LUNAR: does not meet the parameter requirements of (value/text, value/text, value/text)"
Real-time data:"INT: does not meet the parameter requirements of (value)"
Extract data: "INT: does not meet the parameter requirements of (text/value)"
"#Function name# does not meet the parameter requirements of (value)"
Real-time data:"MIN: does not meet the requirement that all parameters are of the same type"
Extract data: "MIN: does not meet the parameter requirements of (value...)"
#Function name# does not meet the parameter requirements of (value,value)"
Illegal formula prompt
The first parameter is boolean type or value type (0 or 1). The second and third parameters are of the same type. If there are empty parameters in the two parameters, the non empty parameter type is returned; The two parameter types are different: return text type.
"IF: the first parameter is not boolean or value"
"IF: does not meet the parameter requirements of (boolean/number, parameter, parameter)"
Note: the result type of expression in real-time data must be the same.
Real-time data:"SWITCH: the result type must be the same"
Extract data: "SWITCH: has at least 3 parameters"
"#Symbol#: Only two Boolean or number expressions can be connected"
"ISNULL: does not meet the parameter requirements of (any types...)"
Empty value (null) is excluded. If other returned result parameters are of the same type, the parameter type of the first non empty and non empty string in the returned result parameters (NVL function, all parameters are returned parameters)
PERCENTILE_AGG
Note: only supports real-time data.
"PERCENTILE_AGG does not meet the parameter requirements of (value, value)"
"PERCENTILE_AGG 's second constant value type parameter must be between 0 and 1"
Same parameter type
"#Function name# does not meet the parameter requirements of (any type)"
APPROX_COUNT_AGG
Illegal error reporting in aggregate function combination scenario:
Error code
Meaning
Examples
61500002
61500003
61500004
SAME_PERIOD
"SAME_PERIOD: does not meet the parameter requirements of (value) or (value, text)"
"SAME_PERIOD: second constant text type parameter must be "Y", "M", "W" (case insensitive)"
"ACC_SUM: does not meet the parameter requirements of (value) or (value, value)"
"ACC_ SUM: second constant value type parameter must be 0,1"
"PERIOD_ANLS: does not meet the parameter requirements of (value) or (value, text)"
"PERIOD_ANLS: second constant text type parameter must be "Y", "M", "W" (case insensitive)"
"PERIOD_TD: does not meet the parameter requirements of (value) or (value, text)"
"RANK_ANLS: does not meet the parameter requirements of (value) or (value, value) or (value, text) or (value, value, text)"
"RANK_ ANLS second constant value type parameter must be 0,1"
"RANK_ ANLS third constant text type parameter must be "asc", "desc" (case insensitive)"
"RANK_ANLS: second constant value type parameter must be 0,1"
"RANK_ANLS: the third constant text type parameter of total must be "sum", "avg", "min", "max" (case insensitive)"
General error message:
Meanings
Example
Parameter contains non aggregate function or constant, or the first parameter must be an aggregate function"
FIXED
" #Function name# : Must contain parameter"
" #Function name# : the field can not be an aggregate function"
" #Function name# : The last parameter must be an aggregate function"
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy