Skip to main content

I stumbled across the following challenge in FME:

how to deal with NULL values if you want to perform a calculation for a new attribute. For example, I want to sum up values (could be any other kind of arithmetics).

The expected result is fine as long as no NULL Value is involved. FME turns any calculation into a NULL result if any NULL is involved (see documentation).

 

 2022-12-20 16_58_50-Transparent Window 

The question that haunts me is, how to treat those NULL values as 0 in the calculation without changing the value to an actual 0 (as the NullAttributeMapper would). The result I am looking for is the following: If all values are NULL i want the result to be NULL, otherwise I want the NULL value to be treated as 0. Furthermore, I dont want the NULL values to be changed to 0, so I can distinguish between NULL and 0 in further calculations.

The AttributeManager has a functionality to handle NULL as 0 (or any other value you like), without tampering with the orignal values.

 

2022-12-20 17_06_53-Window 

can be combined with a condition to preserve NULL for further calculation2022-12-20 17_24_50-Window 

 

 


The AttributeManager has a functionality to handle NULL as 0 (or any other value you like), without tampering with the orignal values.

 

2022-12-20 17_06_53-Window 

can be combined with a condition to preserve NULL for further calculation2022-12-20 17_24_50-Window 

 

 

Thanks, learned something new today!


Reply