BookmarkSubscribeRSS Feed
Srigyan
Quartz | Level 8

I want to run proc forecast on mentioned below data

 

Sr NoProductDateUnit
1P101-Jan-1888
2P102-Jan-1882
3P103-Jan-18149
4P104-Jan-18151
5P105-Jan-18177
6P106-Jan-18307
7P107-Jan-18179
8P108-Jan-18148
9P109-Jan-18139
10P110-Jan-18105
11P201-Jan-18115
12P202-Jan-1875
13P203-Jan-1852
14P204-Jan-18128
15P205-Jan-1850
16P206-Jan-1861
17P207-Jan-1849
18P208-Jan-1842
19P209-Jan-1836
20P210-Jan-1889

 

As you see, there is two product and their date and unit is there, I want to forecast with proc forecast for next 5 days for both the product in the same table. The actual scenario we have more than 40K product so I want to know how can I forecast for next 5 days in the same table with smaller code.

1 REPLY 1
ChanceTGardener
SAS Employee

Use the BY statement.  In your case: 

 

by Product;

 

https://support.sas.com/documentation/onlinedoc/ets/132/forecast.pdf