COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Topic started by: anwar_pat on 16 Jul 2007 02:57:55 AM

Title: How to exclude current Month data..
Post by: anwar_pat on 16 Jul 2007 02:57:55 AM
Hi All,

I want to exclude current month data  from my chart I have dataitem [YTD] value's like Jan/07,Feb/07....
for example now the current month is Jul/07 and its not completed so i want the chart should show till jun/07 data.

Does anyone knows any cognos function is available or any other way to achive the same ?

thanx n advance.

Regards
Anwar
Title: Re: How to exclude current Month data..
Post by: larsonr on 17 Jul 2007 08:45:14 PM
I would handle it by having your time dimension doing the heavy lifting.

If you're using a data warehouse, think of it in this fashion.

For each individual Calendar Date (unique), you list out attributes about it.  First Day of Year, First Day of Week, Last Day of Year, Last Day of Week, in this case First Day of Month.

Now you know based on sysdate (or max date of data in the table) what the first day of the month is.  Then you could run your query to show all data > first day of year and < first day of month.


You could try do something with _first_of_month but I see more flexibility in reporting with it being in a date dimension in the database or even in Framework if it could all be built there.

Good Luck.