new_perl_user
asked on
Yearly Date expression in cognos
Hi,
Can anyone please help me on how to write an automatic expression for yearly date filter.
Year tarts from OCTOBER . For example OCTOBER 2012 - OCTOBER 2013 is an year
Can anyone please help me on how to write an automatic expression for yearly date filter.
Year tarts from OCTOBER . For example OCTOBER 2012 - OCTOBER 2013 is an year
ASKER
I am looking for calculated data item for one year.. can you please let me know how to create a calculated expression for this...
if ([Date Field] is between 2012-10-01 and 2013-10-31) then ('Current Fiscal Year') else null
That should work. Give it a try.
You may have to cast your date field if it's not in yyyy-mm-dd format.
If it doesn't work, I'll test at work on Monday and follow up.
That should work. Give it a try.
You may have to cast your date field if it's not in yyyy-mm-dd format.
If it doesn't work, I'll test at work on Monday and follow up.
ASKER
The above one is like hard-coding the dates right, I need help for automatic one like below where I am using for Quarterly data.
_first_of_month(_add_month s(current_ date,-3))
_first_of_month(_add_month
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If hard coded, you can simply create a data item called 'Custom Year' with expression like below and use it for date filter:
Date between 10/1/2012 and 10/1/2013
For dynamic/rolling, you have to create calculated data items depending upon how many years you want users to see for data selection.