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

reg: date filter

Started by katdbc, 26 Aug 2011 12:59:30 AM

Previous topic - Next topic

katdbc

Hello ppl,

i have current year data prorarated to todays date and i would like to compare the similar data to the pevious year.
so the user inputs usinga parameter in yyyy-mm format
for eg?: 2011-08

so i should get data uptodate  for this year and ytd ,the august 26(today) th 2010. how should i write the filter for the previous year.

database used: DB2
from user: ?Parameter1?---> 2011-08

my filter:[Business View].[Previous year PMR Fact YTD (New ETL)].[REPORT_DATE] between date(substring(?Parameter1?,1,4)+'-01-01') - 1 year and date(?Parameter1? +'-01') - 1 year + 1 month - 1 day - (_days_to_end_of_month (current_date)) days.

this doesnt seem to be working and giving errors.

basically i need a query to find ytd value for the previous year that the user enters.
if user enters 2010-06,

i need a filter to get ytd values for 2009 .

a.chamkeri

Hi,

What you can do here is create 2 queries.
Query 1: filter for the date entered (eg: 2010
Query 2: filter for the date entered -1 eg. 2010-1 = 2009
Create a union of these queries. Design your report on this query.

Best of luck.