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

Current Year minus 1

Started by jrygiel, 10 Jan 2017 11:32:19 AM

Previous topic - Next topic

jrygiel

If Year data items is:  Cast((right ([Presentation].[Projects].[Launch Season],4) || '-01-01'), date)

and Current Year data item is: Cast((Substring((Cast(Current_Date, char(18))), 1, 4) || '-01-01'), date)

We had the following filter: [Year] <= ([Current Year] + 3 Year)

to show 2016, 2017 and 2018 but now that it's 2017 we are having challenges going back to 2016.

Can you help me with this filter to show only 2016, 2017 and 2018. 

Thank you!

New_Guy

Hi,
From what I understood, you have to show years last, current, next. Let me know if I am wrong.

For this you have to create 3 data items from current date to grab the 3 years and then try creating a filter with 'in' condition using the three data items you created. You might have to use #sq()#. Try around this suggestion and let me know. Meanwhile I will give it a try.
Good luck
New Guy

Lynn

Quote from: jrygiel on 10 Jan 2017 11:32:19 AM
If Year data items is:  Cast((right ([Presentation].[Projects].[Launch Season],4) || '-01-01'), date)

and Current Year data item is: Cast((Substring((Cast(Current_Date, char(18))), 1, 4) || '-01-01'), date)

We had the following filter: [Year] <= ([Current Year] + 3 Year)

to show 2016, 2017 and 2018 but now that it's 2017 we are having challenges going back to 2016.

Can you help me with this filter to show only 2016, 2017 and 2018. 

Thank you!

How about changing the filter to something like this:


[Year] between _add_years( [Current Year], -1) and _add_years( [Current Year], 1)



jrygiel

Lynn,

It worked!  Thanks so much.  Have a great day!

:) :) :) :) :)

Lynn

Quote from: jrygiel on 11 Jan 2017 01:12:23 PM
Lynn,

It worked!  Thanks so much.  Have a great day!

:) :) :) :) :)

Hooray!