I have getting this output by below code data,
Col-1 | Col-2 | ranking |
229ZO | 5 | 5 |
229ZO | 6 | 6 |
22BV6 | 1 | 2.5 |
22BV6 | 1 | 2.5 |
22BV6 | 1 | 2.5 |
22BV6 | 1 | 2.5 |
I am getting above ranking by below code, I am not expecting rank as 2.5, it should be 1 in all the case as it is based on col-2 and group by col-1.
code is
proc rank data= have out = want;
var col-2;by col-1;
ranks ranking;
run;
can someone tell me why this is coming as 2.5 and how to correct it.