Skip to main content
Question

Writing formula for cell values in FME

  • November 25, 2014
  • 2 replies
  • 32 views

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.

 

 

 

 

2 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • November 25, 2014
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(feature[+1].Code)+@Value(feature[+2].Code)+@Value(feature[+3].Code)

 

(the expression was entered with the Arithmetic Editor)

 

 

Takashi

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • November 27, 2014
or set a counter with mod3 and then listbuild on this countattribute and then use listsummer grouped by same countatribute.

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings