I have created an analysis with a calculated field on ‘Values’ of ‘LineChartVisual’. I am creating a calculated field within an analysis.
I used ‘describe-analysis-definition’ to get a difinition and used that difinition to create it with ‘create-analysis’. When I ran “describe-analysis” on that analysis, I found that the creation was failing.
The error message, calculation field definition, and error location definition are listed below.
Please tell me the cause of the error and how to deal with it.
Error message:
"Status": "CREATE_FAILED",
"Errors": [
{
"Type": "INVALID_COLUMN_AGGREGATION",
"Message": "Aggregation Function can not be null for Field '77615d67-9c95-4095-b6e5-4f87926904a5.1.1672985171189'",
"ViolatedEntities": [
{
"Path": "sheet/b1b126d8-7dbb-436a-b6ec-cd70f1b7792b/visual/LK_170882f6-73be-4f62-a355-b880048de2b0/field/77615d67-9c95-4095-b6e5-4f87926904a5.1.1672985171189"
}
]
}
]
calculation field definition:
"CalculatedFields": [
{
"DataSetIdentifier": "standard-format-month-ALL",
"Name": "CalculatedFields1",
"Expression": "ifelse(\r\n${absence}='休職率',{#休職率},\r\n${absence}='休職休業率',{#休職休業率},\r\nnull\r\n)"
},
...
error location definition:
"Values": [
{
"NumericalMeasureField": {
"FieldId": "77615d67-9c95-4095-b6e5-4f87926904a5.1.1672985171189",
"Column": {
"DataSetIdentifier": "standard-format-month-ALL",
"ColumnName": "CalculatedFields1"
},
"FormatConfiguration": {
"FormatConfiguration": {
"PercentageDisplayFormatConfiguration": {}
}
}
}
}
],