If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

5 years interval in prompt

Started by laxmanrao83, 15 May 2013 03:37:11 AM

Previous topic - Next topic

laxmanrao83

Hi All,

we have year Column ,In Prompt needs to display 5 years interval starting from 2002 like...
2002-2007
2003-2008
2004-2009
2005-2010
2006-2011
2007-2012
2008-2013
Last record is based on current year(if the current year is 2014 then this series shoud end 2009-2014 inteval).
How to achieve the above scenario

Thanks
Laxman


RKMI

Hi Laxman,

I have designed in a filter something for showing current month, current quarter,current year, previous quarter... Blah blah... In your case here a filter which you might want to use,

ie.
( ?Date Filter? = '2009-2014' AND [Time].[Date].[Month Begin Date] BETWEEN _ADD_YEARS(TRUNC({sysdate}, 'MONTH'), 0) AND LAST_DAY(ADD_MONTHS(TRUNC({sysdate},'MONTH'), -5))
OR
( ?Date Filter? = '2008-2013' AND [Time].[Date].[Month Begin Date] BETWEEN _ADD_YEARS(TRUNC({sysdate}, 'MONTH'), -1) AND LAST_DAY(ADD_MONTHS(TRUNC({sysdate},'MONTH'), -6))
OR
( ?Date Filter? = '2007-2012' AND [Time].[Date].[Month Begin Date] BETWEEN _ADD_YEARS(TRUNC({sysdate}, 'MONTH'), -2) AND LAST_DAY(ADD_MONTHS(TRUNC({sysdate},'MONTH'), -7))


Yes it's hardcoding the filter since I'm guessing you don't have in the database group the way you wanted either.

Thanks,
RK

jeff_rob

Hi Laxman,
Is the year column in the package simply a single year for each row of data? For example:

year
2008
2009
2010
2011

So that you want to select all rows with year between 2008 and 2013?  Is the year column integer or character?

Jeff