Skip to main content
Question

Writing formula for cell values in FME

  • November 25, 2014
  • 2 replies
  • 69 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.

 

 

 

 
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • 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.