DATA Step, Macro, Functions and more

Trend of Total Sales

Reply
Occasional Contributor
Posts: 12

Trend of Total Sales

Hello,

 

My question is "In order to stock the inventory, the store wants to analyze the sales data and predict the trend of total sales for each dress for an extended period of three more alternative days."

 

For this the supporting data that I have got is as follows :

 

 

Dress_ID29/8/201331/8/20132/9/20134/9/20136/9/20138/9/2013
1006032852211422742491266027272887
12121920891512755707508131066
1190380701677788
966005983100511281326145515071621
87633954199611751304139614321559

 

 

Not sure exactly which approach to use here or how to go about this problem.

 

Regards,

 

Aditya

Super User
Posts: 7,866

Re: Trend of Total Sales

Posted in reply to AdityaKir

The first thing to do is, of course, to transpose your dataset (once it has been imported into SAS; it can't be a SAS dataset at the moment as a date is not a a valid SAS column name) so you end up with three columns: ID, date, sales.

Then you need to calculate the difference from previous to current observation, so you get the daily sales; use the lag() function for this.

Once that is done, you can calculate average sales for certain timespans, or see how sales spread over a week, etc, etc.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 19,877

Re: Trend of Total Sales

Posted in reply to AdityaKir

This is a time series analysis so review the Procs under SAS ETS for a relevant method. 

Regular Contributor
Posts: 240

Re: Trend of Total Sales

Posted in reply to AdityaKir

Hi,

 

Since you have only a few observations at your disposal, you can proceed as follows

1. Transpose your dataset

2. Sum the columns to obtain total sales

3 . use a simple linear regression on a time trend with constant

4. Calculate the predicted values

Regular Contributor
Posts: 240

Re: Trend of Total Sales

I missed the "for each dress" part of your question.
This kind of data is dealt with panel data methods.
Or, if you want to keep it simple, you can run a regression for each dress.
Super User
Posts: 10,046

Re: Trend of Total Sales

Posted in reply to AdityaKir
Yeah. Post it at Forecast Forum.
There are many PROC you could use like :  PROC ARIMA , PROC ESM .......

Ask a Question
Discussion stats
  • 5 replies
  • 912 views
  • 0 likes
  • 5 in conversation