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

I have to show 5 years in X-axis of a combination chart

Started by Debadarshan, 24 Feb 2012 08:09:35 AM

Previous topic - Next topic

Debadarshan

I have to show 5 years in X-axis of a combination chart and I have 11 years starting from 2001. For example if I select the year as 2009 then 2009,2008,2007,2006,2005 should come in X-axis(i.e. year selected upto -4). What is the logic that can be written??

blom0344

Assuming the data contains a date item:

extract(year;[somedate]) >= ?parameter? - 4

possibly:

extract(year;[somedate]) >= cast(?parameter?,integer) - 4

Debadarshan

#2
But we have the year defined here. We don't need to extract the year out of a date. Then what can be done to display the year upto -4 years ?

blom0344

Are you kidding?  That would make it entirely trivial as you can simply subtract value 4 from either a year or parameter value:

[someyear] >= ?parameter? - 4

or:

[someyear] >=  cast(?parameter?,integer) - 4