07-31-2016 05:04 AM - edited 08-01-2016 11:00 AM
I have data set (sheet input in the attachment) and on the base of two variables, seller id and revenues, I wouldlike to group the data showing:
- top 5 sellers;
- residual part;
- absolute and percentage values;
(sheet output in the attachment).
I just used the proc sql to sort and then I selected the top 5 using the outobs in the proc sql but to get the full picure I want is taking too many steps. Any elegant and wuick solution to propose?
Thanks in advance.
07-31-2016 04:55 PM
08-01-2016 11:54 AM
This link https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... has instructions on how to turn a SAS dataset into a datastep. Then you can post text of the actual data (or your example data at least) in form that we can use to test code.
Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.