COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: HigherEdCognosGuru on 18 Sep 2017 10:51:17 AM

Title: Same Day for previous year
Post by: HigherEdCognosGuru on 18 Sep 2017 10:51:17 AM
I am looking to query the amount of transactions that have posted from September 1 through current date for this year in one query calculation and in another query calculation query the amount of transactions from September 1 through the same date last year. I know how to get the same month last year but I am struggling with the same date last year. Any thoughts?

Thanks
Title: Re: Same Day for previous year
Post by: Kiran Kandavalli on 18 Sep 2017 11:57:28 AM
In another Query Calculation - you can use like this


[Your Date Field] between _first_of_month (_add_months (current_date,-12)) AND _add_months (current_date,-12)