DATA Step, Macro, Functions and more

accumulated

Reply
Occasional Contributor
Posts: 10

accumulated

hi,

 

i  attached the dataset.Please code for accummulated.

 

syntax please

Attachment
Occasional Contributor
Posts: 10

accumulated

Write a SAS program to calculate accumulated total sales till 15th April. Use aprsales dataset from SAS dataset repository.

Trusted Advisor
Posts: 1,129

Re: accumulated

Could you please provide sample data and expected output for better response.
Thanks,
Jag
Occasional Contributor
Posts: 10

Re: accumulated

hi i attached the dataset
Super User
Posts: 10,500

Re: accumulated


mageshb wrote:
hi i attached the dataset

Note that there are a number of potential issues why users of different operating systems or versions of SAS may not be able to read your data set. Provide data in the form of a data step. Then every one has the same data.

Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

Occasional Contributor
Posts: 10

Re: accumulated

Hi jagadishkatam,

can you please provide ur email id# i have few more doubts.
Occasional Contributor
Posts: 10

code

Write a SAS program to calculate accumulated total sales till 15th April. Use aprsales dataset from SAS dataset repository.

Contributor
Posts: 21

Re: code

[ Edited ]

I'm unable to find your dataset here

 

Edit: Please unmark this from solution

Occasional Contributor
Posts: 10

Re: code

ya i will attach
Occasional Contributor
Posts: 10

Re: code

ya i attached sas7.dat
Contributor
Posts: 21

Re: code

I'm usung mobile , I couldn't find your attached dataset here,can u copy few observations from your dataset and paste here or can u provide few observations of your sample data and expected output here 

PROC Star
Posts: 7,363

Re: code

Look up how to run proc means with a where statement

 

Art, CEO, AnalystFinder.com

 

Super User
Posts: 17,829

Re: code

Homework? You have no attachment. 

 

And show what you've tried. 

PROC Star
Posts: 7,363

Re: accumulated

You'll probably have to give a better description of what you want. If you only want the sum of the sales, there are a number of ways to get it. Here is one:

proc means data=aprsales sum;
  var saleamt;
run;

Art, CEO, AnalystFinder.com

 

 

Occasional Contributor
Posts: 10

Re: accumulated

Write a SAS program to calculate accumulated total sales till 15th April. Use aprsales dataset from SAS dataset repository. i have dataset with label salesdate & salesamount, i just want calculate acumulated till april15 .k
Ask a Question
Discussion stats
  • 17 replies
  • 247 views
  • 1 like
  • 7 in conversation