Showing results for 
Search instead for 
Did you mean: 

Previous Quarter / Month Issue

Former Member
0 Kudos


We have a requirement in which we need to display the previous quarter calculations.

We have two prompts Year and Quarter , and we have Objects like Month , Current Month Count(count of profile_id), Previous Month Count(count of proifle id).

Now suppose user selects Year = 2007 and Quarter = Q1 , then the output should look like:

Month Current Month Count Previous Month Count

Jan 150 ?

Feb 250 150

March 350 250

The value for Jan ( Previous Month Count) is not coming properly.

As when we enter year = 2007 andquarter = Q1 , the data of December 2006 should come in the previous month count of Jan.

Can anyone suggest me how to solve the problem?

View Entire Topic
Former Member
0 Kudos


Can you post the version of the database that you are using as well as a copy of the @prompt?



Former Member
0 Kudos


The below given is the prompt query :

@Select(Time\Year) = @PROMPT('1. Enter Year','N','Time\Year',mono,free) OR

@Select(Time\Year) = (@PROMPT('1. Enter Year','N','Time\Year',mono,free)-1).

The output is :













For Previoous(variable) , Previous(Current) query is used.

But for the month=1 , it is not displaying the previous value as the user Enters Year = 2006 and Quarter = Q1 , but for January both the values changes means the data of Dec-2005 should be displayed in the previous column.

Former Member
0 Kudos


Thanks for posting the @prompt info, however, what database are you using? There are different facilities available to you depending upon Oracle or SQL Server (the two most popular brands), so knowing that tidbit will also help lots. Also, looking at your @prompt formulas, is the object "'Time\Year'" defined as a numeric or a date in your universe? Knowing just a bit more will help out. I noticed that you have a lively discussion on this matter going on under the BOBJ forum, and you mentioned in those postings that there is also another prompt involved (quarter), and haider points out that if the user only selects quarter 1, and 2006 info, then quarter 4/2005 info will never appear. Somehow you'll need to endow your report with the capability of capturing quarter 4/2005 info when the user select 2006 and quarter 1 in the prompts. How that will be done exactly is still a myster in my mind, but perhaps gives you more thought on the process. Good luck!