Hi everybody. i have a question about an error i faced with.
I write this expression and it doesn’t work.
//mean = (round(average(column(“201801”),column(“201802”),column(“201803”)),2)) * 1000
join(mean, “$”)//
the error is:
An error occurred during the execution of the script in function ‘average’ at line 1: The provided element ‘105’ of type ‘String’ is not a valid number.
i changed the type “string” but the same error is showed.
if you can, please, show the data that you are working with. The error says that in one/some of the columns (201801, 201802, 201803) you have not a number values (integer of double), but a string (text).
As @alex_never said you have at least one column of type string. You can convert the column to a numeric type like integer or double by using the String to Number node or simply use the toInt() or toDouble() functions in the Column Expressions node to convert the type of the column(s).
E.g. mean = round(average(toInt(column("201801")),toInt(column("201802"))),2) * 1000