Skip to main content
Hi.

 

I want to create an attribute whose value is the sum of the three following values an existing attribute (Code in the picture). How do I write this formula in FME, specifying the value cells? I would rather not do this in excel as I would have to transform to xlsx and back.

 

 

 

 
Hi,

 

 

If you need to get the result like this image, consider using the "Multiple Feature Attribute Support" option of the AttributeCreator.

 

 

 

The "SumCode" in the image was generated with this setting.

 

Check the "Multiple Feature Attribute Support" checkbox.

 

Number of Subsequent Features: 3

 

If Attribute is Missing, Null or Empty: Use Other Value

 

Attribute Replacement Value: 0

 

Attributes to Set:

 

SumCode = @Value(featurel+1].Code)+@Value(featurel+2].Code)+@Value(featurel+3].Code)

 

(the expression was entered with the Arithmetic Editor)

 

 

Takashi
or set a counter with mod3 and then listbuild on this countattribute and then use listsummer grouped by same countatribute.

Reply