COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: sanchoniathon on 15 Apr 2014 01:07:31 PM

Title: Report Studio - How to calculate [Year To Date Last Year]
Post by: sanchoniathon on 15 Apr 2014 01:07:31 PM

Hi,

I can't seem to find the correct way of calculating (YEAR TO DATE of last year).

Anyone can suggest something ?

Thanks !

Title: Re: Report Studio - How to calculate [Year To Date Last Year]
Post by: cognostechie on 15 Apr 2014 08:42:49 PM
Try this:

extract(year,[Database Layer].[Date_Dim].[Calendar_Date]    ) = extract(year, current_date) - 1 and
[Database Layer].[Date_Dim].[Calendar_Date]   <= _add_months (  current_date , -12)
Title: Re: Report Studio - How to calculate [Year To Date Last Year]
Post by: sanchoniathon on 20 May 2015 10:53:02 AM
Sorry for the delay but THANK you for your post.

:)