DATA Step, Macro, Functions and more

Distinct values in sub Group

Accepted Solution Solved
Reply
Contributor
Posts: 71
Accepted Solution

Distinct values in sub Group

Hi All, 

The solutions of the community have always helped me and saved lot of time too. Here I am again with another problem. It is looking very simple but I am not able to do it by simple program.

My input is as follows

1A
1A
1B
2A
2A
2A
2B
2B
3A
3B
3C
3C
3C
3C
4D
4D
4E
5A
5B
5C

 

and I am looking for output where I get unique values of sub-group as follows

1A
1B
2A
2B
3A
3B
3C
4D
4E
5A
5B
5C

 

Thanks in advance !


Accepted Solutions
Solution
‎11-07-2016 08:10 PM
PROC Star
Posts: 1,562

Re: Distinct values in sub Group

Like this?

 

 

proc sort nodupkey;

  by VAR1 VAR2;

View solution in original post


All Replies
Solution
‎11-07-2016 08:10 PM
PROC Star
Posts: 1,562

Re: Distinct values in sub Group

Like this?

 

 

proc sort nodupkey;

  by VAR1 VAR2;

Contributor
Posts: 71

Re: Distinct values in sub Group

Wow !
Yes, its working .....
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 151 views
  • 1 like
  • 2 in conversation