Desktop productivity for business analysts and programmers

Working out Best Salesperson by Revenue

Occasional Contributor
Posts: 19

Working out Best Salesperson by Revenue

Hi guys,

My aim is to produce a list of the top/best salespeople in the company by revenue. In my dataset, I have the total retail price of the individual product purchases and the employees who sold the products. From there, I want to collate the individual purchases together to find out the total revenue of the purchases for each employee .  Then I want to rank the employee in order to find out which employee pulls in the greatest total revenue. How would I do this? Please do not offer solutions including code since I am not adept at all with using it.


Super User
Posts: 10,530

Re: Working out Best Salesperson by Revenue

Posted in reply to agreekgod

Using the Query builder wizard, create a sum of the total retail price, group by employee and order by descending calculated sum.

"since I am not adept at all with using it."

Then it is high time that you started learning, or you will stay a "SAS illiterate".

Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Posts: 1,333

Re: Working out Best Salesperson by Revenue

Posted in reply to agreekgod

Kurt's solution is perfect. However, I am going to introduce a philosophical debate:

SAS in its origins is a programming language, like C or Visual Basic, and to use it effectively you need a

"programmer" mentality, which a lot of business users don't have. (No insult...I'm a programmer, but I

don't have whatever business expertise you possess.)

To extend the reach of SAS tools, the company introduced a new generation of products, of which Enterprise

Guide is a prominent member. These tools, while they use SAS "under the covers", don't require the ability

to program in SAS.

If your a business person, seeking information from your data, in my opinion it is perfectly reasonable to

use Enterprise Guide without knowing SAS, just as business people use Excel without understanding the

underlying C code used to develop it.

In the cases where your requirements extend beyond what Enterprise Guide can do, you have several options:

1. Ask a SAS programmer in your organization to develop the snippet of code that you need.
2. Post your problem on this forum, and very likely someone will provide a solution. This does imply that you understand the basics of using the SAS language and submitting code through Enterprise Guide, but that is fairly straightforward.
3. Hire a contractor (like me!) to do it for you.

However, for many business problems, you'll find that Enterprise Guide is a powerful, easy to use tool.

Needless to say, these are my opinions only. I hope you find them helpful.


Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation