COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: snksap on 01 May 2008 12:22:02 AM

Title: how to display previous period value
Post by: snksap on 01 May 2008 12:22:02 AM
I have a report with three prompt values like '13 W/E 04/20/2007','13 W/E 07/21/2007'and '13 W/E 10/20/2007'.

I should select any one of the above values in prompt page while running the report.

Now in report page, it’s a cross tab report, which has the following items.

                            dollars     previous period dollars

Products              xxxxxx        xxxxxxxxxxxx

There is only dollars qry item, no direct 'previous period dollars' item in my objects.

When I select the prompt value it shud show current and previous period dollars.

For ex: when i select '13 W/E 07/21/2007, report shud show dollars ('13 W/E 07/21/2007) and previous period dollars (13 W/E 04/20/2007)

In the same way for other prompts, except for '13 W/E 04/20/2007' for this there won’t be previous period value.

Please let me know how to get the 'previous period dollars ' in my report.

Tell the expression or calculation needed for that

-Naveen.
Title: Re: how to display previous period value
Post by: wyconian on 30 May 2008 04:22:30 AM
Hi

If you're using DMR you can use the lag function to give you the previous week figures (assuming your date dimension has a week level). 

If you're using a relational view rather than DMR it's more difficult, you may need to have a couple of queries one showing this week, the other showing the previous week figures and join them together.

Hope that helps.