COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: babu babu on 27 Jul 2011 02:35:13 PM

Title: MDX function for previous month
Post by: babu babu on 27 Jul 2011 02:35:13 PM
Hi,

How to calculate the previous month bases on the sysdate from the transformer cube in report studio.

Thanks,
Anand.
Title: Re: MDX function for previous month
Post by: RobsWalker68 on 28 Jul 2011 08:53:19 AM
Hi Anand,

There are different ways to handle this.  A couple of suggestions:

1. Set up a data source feed based on sysdate and use it to set the current period. Use relative dates for current and previous month

2. Same as above to identify current month then:

In your Report Studio report using the dimensional function linkmember return the corresponding month value from your time dimension.

Finally, apply the lag dimensional function to produce previous month.

Option 1 is the simplest, although option 2 is more useful if you are looking to work out YTD etc

Rgds

Rob