BusinessObjects Board

Create Current Quarter, Prev Quarter condition objects

Hi Friends,

I have a requirement where I need to add date filter conditions in the universe, so that those can be used to restrict at report level.

I am working on BO 4.0 Universe Design tool and I need to create filter conditions for Current_Quarter,Previous_Quarter, Last_6_months etc.

Database is TERADATA.

Quarter referred by business is calendar wise -i.e. Jan-Mar is first quarter.
For ‘Last_6_months’ condition, I have used the date column 'Reporting_period ’ between add_months(current_date, -6) and current_date.

For Quarter and Previous Quarter, I guess I may need to use if else condition based on months but I believe there must be a simpler solution.But I am unable to find conditions for Quarter, Previous Quarter etc.

Please provide your suggestions and thanks a lot in advance!


mysticBO (BOB member since 2011-10-25)

Hi mysticBO,

There is a nice example on how to solve this with a very small sql query:

select trunc(add_months(sysdate,-3),‘q’) first_day,

      add_months(trunc(add_months(sysdate,-3),'q'),3)-1 last_day

from dual;


iguanasterix :iceland: (BOB member since 2008-02-18)

https://bobj-board.org/t/152613
Check the above link, it has plenty of examples to give you an idea.


BO_Chief :us: (BOB member since 2004-06-06)