Hi All,
I want to show Ranking of Customer Based on Revenue.
I know that there is feature of SAS VA where we can select Rank based on which measure.
But I also want to show Rank number.
Ex:-
| Customer Name | Rank | Revenue |
| C1 | 1 | 999 |
| C2 | 2 | 998 |
| C3 | 3 | 987 |
| C4 | 4 | 986 |
| C5 | 5 | 985 |
@ashishj816 wrote:
Hi All,
I want to show Ranking of Customer Based on Revenue.
I know that there is feature of SAS VA where we can select Rank based on which measure.
But I also want to show Rank number.
Ex:-
Customer Name Rank Revenue C1 1 999 C2 2 998 C3 3 987 C4 4 986 C5 5 985
Do you want to do this in VA or base programming code? You have posted this in an area that is intended for general programming, not VA.
This is a general programming solution using the Sashelp.class data set and ranking based on height.
proc rank data=sashelp.class out=work.classranked descending ; var height; ranks heightrank; run; proc sort data=work.classranked; by heightrank; run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.