00:01
For this problem, to begin, the first thing that we'll need to do is get our data into sas somehow.
00:05
So we'll use a data step.
00:07
Let's call this data, let's just call it monthly sales.
00:15
We know that we're going to need two input variables.
00:19
One will be the month and one will be the actual sales value.
00:23
So let's say we have month.
00:25
We'll specify the format there as month dot.
00:29
And then we'll have the sales.
00:31
And looking at that looks like we need to have at least five spaces.
00:38
So let's say sales will format as eight dot, then we'll use the data lines and start inputting our values.
00:47
Now we are told that we have the monthly sales january to december.
00:51
So what i'll do is i'll just say i'll give numerical values for the month starting at one and then going through to twelve and then also providing the value for the actual sales for that month.
01:03
So we have 1, 1200, 2, 1500, 3, 1800, 4, 1400, 5, 1300, 6, 1600, 7, 1700, 8, 1800, 9, 1900, 10, 20 ,000, 11, 21 ,000, and 12, 22 ,000.
01:38
Let me close that properly, run and let's see our results here.
01:42
So we can see that everything has copied properly.
01:47
So the next thing that we'll do, we know that we need to group the data by quarter.
01:52
So i'll say data, quarter sales, set monthly sales.
02:02
And i'll create a new variable called quarter, which i'll find by converting the month into a quarter.
02:12
So there is actually a quarter or quarterly format built into sas.
02:18
So what we'll do is say quarter is equal to put month into the form qtr...