Skip to main content
Solved

create group from numeric value


alc33
Contributor
Forum|alt.badge.img+10
  • Contributor

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

View original
Did this help you find an answer to your question?

3 replies

geomancer
Evangelist
Forum|alt.badge.img+50
  • Evangelist
  • 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+10
  • Author
  • Contributor
  • May 18, 2022

Great!

I didn't know this option.

Thank you! It works very well!


geomancer
Evangelist
Forum|alt.badge.img+50
  • Evangelist
  • May 18, 2022

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


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