How to handle Null values in field calculations

Hello everyone,

I use a time series panel to visualize some data.
One of the fileds is calculated as the sum of two other fields using the “add field from calculation” transformation.
There is some unexpected behavior when the fields the calculation is based on are empty. In this case I would expect the calculated field to be empty as well but it defaults to 0.

The attached screenshot shows the problem in the tabel view. The last two columns are calculated and show 0 when the fileds they are based on are empty.

I tried several transformations to solve the problem and what got me closest to the needed result was to filter by value and eliminate the 0 lines. Unfortunately that also eliminates the data in the forecast column so this is not a valid solution.

My datasource is influxDB. If it was SQL I would know how to move the calculation to the query and wouldnt need the transformation at all. But for influxDB I hae not found any way how to get the total value of two fields into one

Hope I am just missing something obvious.

Best regards


What happens if you use xonvert field transformation and convert forecast to number

that causes the forecast column to be filled with 0 instead of empty cells.
But forecast is fine as it is, the problem is only with two columns on the right side that contain 0 although the columns they are calculated from contain null (or are empty)