COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: bonniehsueh on 19 Oct 2009 10:56:02 AM

Title: Last Full Quarter and Last Full Year
Post by: bonniehsueh on 19 Oct 2009 10:56:02 AM
Hi All -
I need to create a report that shows Last Full Quarter and Last Full Year.

User selects an end date from values below. For example, when the user selects 200907, that is in the middle of Q3 so the last full quarter is Q2. Q2 sales should be shown.

The data elements I have to work with look like below. Unfortunately I do not have the option to add additional values like first of the quarter.

200908
200907
200906
.....
200808
200807
200806
.....
200708
200707
200706
...

Any ideas would be appreciated.

Thanks!
Title: Re: Last Full Quarter and Last Full Year
Post by: billylodz on 20 Oct 2009 03:49:28 AM
cube ?

http://www.cognoise.com/community/index.php/topic,4815.msg16862.html#msg16862
Title: Re: Last Full Quarter and Last Full Year
Post by: bonniehsueh on 20 Oct 2009 01:23:53 PM
Yes there are functions when using a dimensional data source. However, this is a relational data source.

Thoughts on the calculation when using relational data?

Thanks in advance!
Title: Re: Last Full Quarter and Last Full Year
Post by: VisioX on 21 Oct 2009 12:50:09 PM
Might sound complicated but try this...

Split you "quarter" into two fields (year/month), divide the month by three and cut off the decimals, add one to the result and take that as your start month (+2 more to get the full quarter). If the result is negative, subtract one from your year and make your month = 10.