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??
Assuming the data contains a date item:
extract(year;[somedate]) >= ?parameter? - 4
possibly:
extract(year;[somedate]) >= cast(?parameter?,integer) - 4
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 ?
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