SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Hierarchy by groups

Reply
Occasional Contributor
Posts: 18

Hierarchy by groups

I am trying to create the rules. For example, we always start at HIGH cases --> if there are two values in a row by each group were the it falls between 11 through 20, i would like to assign it High regardless of the whether those two high values are in the top, middle, or or bottom for that group. If they are not High, then we see if there are two consequective values that are between 1 through 10 and assign them "LOW"

 

I have two legends - High (11 through 20) and Low (1 through 10)

 

Here's the sample dataset:

GROUPVALUEseq_id
1121
142
163
154
1135
4121
4132
413
424
5191
522
533
5144
5205

 

 

Here's the output:

IDvalueseq_idoutput
1121 
142Low
163 
154 
1135 
4121High
4132 
413 
424 
5191 
522 
533 
5144High
5205 
Ask a Question
Discussion stats
  • 0 replies
  • 462 views
  • 0 likes
  • 1 in conversation