05-11-2015 08:41 AM
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.
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.
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?
05-11-2015 10:28 AM
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.
09-21-2016 11:07 PM
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.