Skip to main content
Solved

create group from numeric value

  • May 18, 2022
  • 3 replies
  • 59 views

alc33
Contributor
Forum|alt.badge.img+11
  • Contributor
  • 54 replies

Hi !

I have an xls file with 2 columns. One contains a code and the other contains numerics values.

I would like to create an attribute that group my data when there are a break on the values and group by code. For example :

 

code value

a 1 => group 1

a 2 => group 1

a 3 => group 1

a 10 => group 2

a 11 => group 2

b 1 => group 3

b 2 => group 3

 

I saw "AttributeRangeMapper" but I have to indicate the bounds. In my case I would like that the bounds are create automatically because my datas change every time.

My values can be integer or decimal.

 

Thanks !

 

Best answer by geomancer

Use the 'Adjacent Feature Attributes' option of the AttributeManager. When 'Code' does not change, and 'Value' increases by 1, use the current group number. In all other cases increase the group number by 1.

Grouping

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.

3 replies

geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • Best Answer
  • May 18, 2022

Use the 'Adjacent Feature Attributes' option of the AttributeManager. When 'Code' does not change, and 'Value' increases by 1, use the current group number. In all other cases increase the group number by 1.

Grouping


alc33
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • 54 replies
  • May 18, 2022

Great!

I didn't know this option.

Thank you! It works very well!


geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • May 18, 2022

That's what I like most about this community: is a great place to learn something new about FME. Every day!