When using a calculated field with a parameter, the following error occur sif the parameter is set to a value that is not contained in the calculation:
ERROR 3459: Function SUM(unknown) is not unique HINT: Could not choose a best candidate function. You may need to add explicit type casts.
For example, if you have a calculation similar to the following:
WHEN 1 THEN x
WHEN 2 THEN y
WHEN 3 THEN z
And a parameter with values 1, 2, 3 and 4, if the parameter is set to 4, the error will occur.