DATA Step, Macro, Functions and more

Creating a performance index

Reply
Occasional Contributor
Posts: 7

Creating a performance index

I have a dataset with variables as "SalesID", "ActualSales" , "TargetSalesAmt" and "Region". I need to create a performance index based on total sales achieved against the target set, and identify the best performing region overall. How can this be done without using Proq SQL.

Example:-

SalsIDActualSalesTargetSalesRegion
XE9081900013800East
XA9082000018000East
XC1022500030000West
XB1021500018000East
XA9082000022000West
XE9081000010000North
XB1023000025000South
Super User
Posts: 5,426

Re: Creating a performance index

Posted in reply to Deepakkala04

Can you define in more detail what a performance index is? Perhaps by give some sample desired output?

And why not SQL?

Data never sleeps
Occasional Contributor
Posts: 7

Re: Creating a performance index

Hi Linush.. Actually I want to represent the above data in a format which is some what like:-

1. Region with Highest Sale

2. Sales achieved (BY salesID) and also if they have been able to meet their targets

Y no SQL:- am looking for a very basic resolution for this problem. I want to test out if this is possible thru any basic SAS proc/data statements.(they might be a bit tedious)

PROC Star
Posts: 7,468

Re: Creating a performance index

Posted in reply to Deepakkala04

Depending upon your definition of performance index, something like the following might suffice:

data have;

  infile cards dlm='09'x;

  input SalsID $ ActualSales TargetSales Region $;

  cards;

XE908 19000 13800 East

XA908 20000 18000 East

XC102 25000 30000 West

XB102 15000 18000 East

XA908 20000 22000 West

XE908 10000 10000 North

XB102 30000 25000 South

;

proc summary data=have nway;

  var ActualSales TargetSales;

  class region;

  output out=want (drop=_Smiley Happy sum=;

run;

data want;

  set want;

  growth=ActualSales/TargetSales-1;

run;

proc sort data=want;

  by descending growth;

run;

Valued Guide
Posts: 2,177

Re: Creating a performance index

Posted in reply to Deepakkala04

Merge against the output from

PROC MEANS data= dataset missing noprint  nway ;

Class region ;

Var _numeric_ ;

Output out= index_perf( drop= _type_  )

Sum= /autoname ;

Run;

Like

proc sort data= dataset ;

By region ;

Run ;

Data index_and_data ;

Merge dataset index_perf  ;

By region ;

****** suitable performance calcs ;

run;

Ask a Question
Discussion stats
  • 4 replies
  • 611 views
  • 7 likes
  • 4 in conversation