COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: jd on 23 Jan 2009 11:11:41 AM

Title: how to get last 15 weeks in report studio
Post by: jd on 23 Jan 2009 11:11:41 AM
Any body can help to get last 15 week in report studio.

Thanks in advance.
Title: Re: how to get last 15 weeks in report studio
Post by: unnava on 23 Jan 2009 11:20:22 PM
could you tell me wt exactly u have the prompts so that i can work on the issu
Title: Re: how to get last 15 weeks in report studio
Post by: sowmya786 on 28 Jan 2009 01:33:25 AM
hi

U can do with the below filter

_add_days([D_TIME].[CALENDER_DATE];89)>current_date


with the above filter u can get last 15 weeks data

15*7=89days

Title: Re: how to get last 15 weeks in report studio
Post by: bonniehsueh on 28 Jan 2009 10:28:44 PM
How would you use this calculation in a list report?

Lets say that you have a list with 2 measures. Two columns are needed, Last 15 weeks and Last 5 weeks.  Would you create 2 queries filtering one by 15 weeks and the other by 5 weeks and then unioning them to place both columns in a list or is there a better way to do this?

Title: Re: how to get last 15 weeks in report studio
Post by: david.stachon on 30 Jan 2009 05:22:28 PM
yes, unioning those two time flavours is certainly an option.

The better option, if "rolling 5 weeks" and "rolling 15 weeks" are common periods that you or your users are examining, then these should be created as relative time categories (assuming you are using OLAP (i.e. PowerPlay Cubes or MSAS for example)). then, this can be done in one pass with the wonderful world of MDX.
Title: Re: how to get last 15 weeks in report studio
Post by: bonniehsueh on 03 Feb 2009 01:50:27 PM
Got it. Thanks David. Creating these items as a column in a cube work, assuming that the the rolling calculation is based off the Current date. 2 follow up questions.

1) When the data source is a relational model. How would you address it then?

2) Assuming its a cube, if the requirement was to have it based on a date determined in the report, then it would have to be a report level calculation b/c the cube cannot take report parameters - Correct?