Skip to main content
Question

Creating unique values based on ranges


Hi all,

If have an issue creating a unique column for a range of points. The points are separated (based on calculations) in ranges that run from 3 to 2, all the point within this range have 1 values (for example 3,1,1,1,2). I would like to generate a new column containing for each range an unique id. See my example columns down below, showing the preferred result:

UUIDRangesPreferred ResultA31A

 

11A

 

21A

 

-

 

A

 

32A

 

12A

 

22B33B

 

13B

 

13B

 

23C34C14

 

Is there a way to calculate this final column?

2 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • December 2, 2019

So the features are in order and the first feature always has a range value of 3?

You can use adjacent attribute mapping to increment a group number everytime 3 is encountered

Probably easiest to deal with the range with value '-' afterwards


gazza
Contributor
Forum|alt.badge.img+6
  • Contributor
  • December 2, 2019

A couple of ideas, you could use a StatisticsCalculator grouping by Range and look at the _count value coming out of the Cumulative port.

Or use a Counter where the counter name is dynamically generated using range, such as counter_@Value(Range)

 


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