BusinessObjects Board

Filter dataset for previous 12 months

What is the formula in WEBI to filter my table/charts by the previous 12 FULL months of data? :hb:


mssbass :us: (BOB member since 2010-07-13)

If you use Universes, I I would ask your Universe designer to create objects in the Universe which you can then use in your webi queries:

If the Universe pointed to an Oracle database, the object could use the functions: TRUNC, ADD_MONTHS, SYSDATE.

Object 1
Name : Start Date of Current Month in Previous Year
SQL : add_months(trunc(sysdate, ‘MONTH’), - 12)
e.g. : For today’s date ‘04/02/2013’, the SQL would return ‘01/02/2012’.

Object 2
Name : End DateTime of Previous Month
SQL : trunc(sysdate, ‘MONTH’) -(1/(246060))
e.g. For today’s date ‘04/02/2013’, the SQL would return ‘31/01/2013 23:59:59’. Note that if you do not need/want the time element, the SQL could just be = trunc(sysdate, ‘MONTH’) -1

You can then use these objects in query filters against your date object, to return all rows that fall between these two dates (i.e. the last 12 FULL months).

If they are willing to do this, then maybe provide an extensive list of required dynamic date objects?

Such as:
Current Date
Current Date (YYYY-MM-DD) [e.g. as a Character data type, not date)
Current Week Start Date
Current Week End Date
Current Week (YYYY-WW)
etc…
Previous Day
Previous Day (YYYY-MM-DD)
Previous Month Start Date
Previous Month End Date
Previous Month (YYYY-MM)
Previous Year Start Date
Previous Year End Date
Previous Year (YYYY)
etc…


Darth Services :uk: (BOB member since 2007-11-20)