BusinessObjects Board

Alternative Quarter

In webi report I should display alternative quarter data
E.g. 1: Quarter = 4 and Year = 2014
Then it should display data for Quarter 2 ( 1st April to 30th June for 2014)
E.g. 2: Quarter = 1 and Year = 2014
Then it should display data for Last Year Quarter 3 (1st July to 30th Sep 2013)

I have Calendar Quarter prompt and
Calendar Year prompt in report

Please suggest me

Thank you !


SAPBOBJ567 (BOB member since 2013-10-24)

I find the best way to do something like this is to have (or create) an “offset” calculation. For example, consider the following range of quarters:

2013-Q1
2013-Q2
2013-Q3
2013-Q4
2014-Q1
2014-Q2
2014-Q3
2014-Q4

In order to go “back” two quarters, you have to deal with the fact that Q4 is sometimes less than Q1, and you have to deal with year changes. Life gets much easier if you add a quarter “offset” value.

2013-Q1 1
2013-Q2 2
2013-Q3 3
2013-Q4 4
2014-Q1 5
2014-Q2 6
2014-Q3 7
2014-Q4 8

In this case it’s just a sequential number. But if you want to calculate “two quarters ago” for any given quarter, it’s simply finding the row where that row quarter offset is two lower than this quarter offset. It doesn’t matter if you cross a year boundary or not.

What I like to do is have the “current” quarter be an offset of zero, and future quarters have a positive value and past quarters have a negative value. Assuming that we’re in 2014-Q1 right now that would look like this:

2013-Q1 -4
2013-Q2 -3
2013-Q3 -2
2013-Q4 -1
2014-Q1  0
2014-Q2  1
2014-Q3  2
2014-Q4  3

Dave Rathbun :us: (BOB member since 2002-06-06)