Wednesday, May 9, 2012

Cognos Report Studio Expressions/ Formulas

Applying Filter on date field to retrieve only past 12 months data


Extract(year,[Date])=Extract(year,{sysdate})
OR Extract(year,[Date])=Extract(year,{sysdate}) -1
AND Extract(month,[Date]) 
      BETWEEN Extract(month,{sysdate})+1 AND 12 




Applying Filter on date field to retrieve only last week's data


[Query1].[Date] > _add_days (date2timestamp (Today ()), -7 )









No comments:

Post a Comment