COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: mrmo on 05 Jan 2016 05:35:44 AM

Title: comparason of year on year sales
Post by: mrmo on 05 Jan 2016 05:35:44 AM
The method is the bit I am not sure of whether it is report studio or transformer, or SQL.

The end, I need to be able to compare sales in a crosstab between two days a year apart. But I don't want to compare 1 jan 2016 to 1 jan 2015, I want to compare tues 5th jan 2016 to tues 4th? jan 2015?

The idea is to compare the day of the week a year apart rather than the date a year apart.

If it wasn't for the fact that this being a leap year reminded me I could have cheated and done dateadd(m,-365,getdate()) and then picked up the pieces at a later date

But I am assuming that there is a far better way? would parallelperiods() or similar be the way forward?

Title: Re: comparason of year on year sales
Post by: schrotty on 05 Jan 2016 06:52:00 AM
Hi mrmo,

you use a transformer-modell as you Report Datasource? (= Dimensional-Model).

You can Modell a new Time-Dimension based on Weeks. (Hierarchy like Year - Week of Year - Day of Week). Then you can use the parallelperiods-Function to get the same Day of another Year.
Notice some Years do have more than 52 Weeks (2015 had 53) and the 1th January is not every year the first day of Week 1...

Some Companies use a retail calendar https://www.google.de/?gws_rd=ssl#q=retail+calendar (https://www.google.de/?gws_rd=ssl#q=retail+calendar) to handle week-comparsion.


schrotty