Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Is it possible in VA: parallel period?

Reply
Regular Contributor
Posts: 225

Is it possible in VA: parallel period?

Hello all,

My customer wants to compare day by day how much profit they made. As their sales are dependable of holidays like Easter, Christmass, Valentine, ... or even if it's a saturday or a friday.

They have created a calendar to map these special dates.I take the example of Easter. For example: in 2013 it was 15/04, in 2014 it was 4/4 and in 2015 it was 10/4 (as an example). The dataset contains one line for each day in 2015.

DateCurrentYearDatePreviousYear
01/01/201502/01/2014
02/01/201503/01/2014
10/04/201504/04/2014
10/05/201509/05/2014

My dataset looks like this. I got all data from 1/1/2014 to today. The saledateLY is only filled in if the saledate is from this year.

SaleDateSaleDateLYProfit
01/01/2014100
01/01/2014120
04/04/2014100
10/04/201504/04/2014156
10/05/201509/05/2014

Can I use the parallel period, or the relative period to calculate the differences between the profits made between days, weeks, months and use the special calendar?

Thanks

Filip

SAS Super FREQ
Posts: 275

Re: Is it possible in VA: parallel period?


Hi Filip,

Unfortunately, the ParallelPeriod and RelativePeriod operators return a missing value when the smaller interval is by day.

There might be some workaround in how you build your dataset that would get the result you want, however.

Thanks,

Sam

Regular Contributor
Posts: 225

Re: Is it possible in VA: parallel period?

Thanks for the answer.

I'm trying to create the dataset upfront. Thanks for the answer.

Contributor
Posts: 39

Re: Is it possible in VA: parallel period?

I have to do something similar at work to report enrollment comparisons for the current term compared to the previous year's term.  Given a list of associated dates for the current year with the previous year,  I create a table that translates the current date to the "comparative" one for the previous year.  The "hard" dates are typically holidays like Labor Day.  Otherwise I try to match the same weekday so that weekends match up.  Once the table is created, it is easy to compare the appropriate dates.

 

Hope this helps.

Post a Question
Discussion Stats
  • 3 replies
  • 637 views
  • 0 likes
  • 3 in conversation