QlikConnect posted on October 01, 2009 23:57
Today I came across a situation where there was an incorrect year-to-date comparisson made with a previous year. When comparing the turnover with last year I noticed that we were slightly in front compared with last year because the fourth day in week 13 is March the 26th while this was actually the 25th in 2008. The result is quite misleading because one might become very reliefed in these unfortunate times nowadays by thinking one would be ahead of last year!!
The solution in our case was not that difficult because we were already using a calendar table from our datawarehouse and all that needed to be changed was the actual starting date for each year. So if a year would have 53 weeks it could mean that the starting date for our comparison would be January the 3rd (instead of January 1st). I am sure there are nice ways to use variables to determine the start of the year (but I haven't found that for the 4 week periods).
So all we had to do was adjust the variable for the starting day with the reference to the field in our calandar table to have the comparison accurate.
Kind regards,
The QlikConnect Team