petejigsaw
MIS
thread767-1634738
In the above thread, lbass helped me get comparison reporting working so I could show comparisons of sales in a week number in Year 2010 against the same week number in 2011.
However, now its 2012, the data selection formula below has stopped returning any data for the previous year.....
({%Year} = year(currentdate) or {%Year} = year(currentdate)-1) and
datepart("ww",{peranal.pa_date}) = datepart("ww",currentdate) and
dayofweek({peranal.pa_date}) <= dayofweek(currentdate)
I have tested by removing the datepart and dayofweek criteria and get the expected results.
If I then add back the datepart section, I get the expected results.
Therefore, the problem is with the dayofweek criteria, but I can't work out why???????
Can anybody help?
Thanks in anticipation.
In the above thread, lbass helped me get comparison reporting working so I could show comparisons of sales in a week number in Year 2010 against the same week number in 2011.
However, now its 2012, the data selection formula below has stopped returning any data for the previous year.....
({%Year} = year(currentdate) or {%Year} = year(currentdate)-1) and
datepart("ww",{peranal.pa_date}) = datepart("ww",currentdate) and
dayofweek({peranal.pa_date}) <= dayofweek(currentdate)
I have tested by removing the datepart and dayofweek criteria and get the expected results.
If I then add back the datepart section, I get the expected results.
Therefore, the problem is with the dayofweek criteria, but I can't work out why???????
Can anybody help?
Thanks in anticipation.