COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: andoid95 on 22 May 2014 08:57:22 AM

Title: how to get Previous year amount?
Post by: andoid95 on 22 May 2014 08:57:22 AM
Hi,
I have created a list report in cognos 8 using relational model. in this report I have created a prompt for year and month. when user selects the year related Invoice amount will display in list column. Now I also wants to get the last year last invoice amount beside the current year amount.
e.g if user selects year 2013 month 09 then in list column it will show as "Invoice amount" between 01-2013 to 09-2013 beside this it should display the "Invoice amount last year" i.e. for year 2012.

Note: I am using relational model.

Thanks,
Title: Re: how to get Previous year amount?
Post by: Satheesh on 22 May 2014 09:45:29 AM
Hi,


If you need full year of last year do the below...


already you created the Query for Current year, in that you may use filter on Year = current year, month = selected month and other filter conditions...


Just copy and past the Current year query, Give the name to pasted/new query. Remove month = selected month filter and change the Year filter like    Year = ( Current year -1 )


Join both the queries on common data item and low level granularity data item.




In Join Query drag the necessary data items from Current Year Query and drag the value/amount data item from Previous Query.


Assign this join to List.


Thanks & Regards
Sateesh



Title: Re: how to get Previous year amount?
Post by: andoid95 on 22 May 2014 10:59:10 AM
hi,
thks it works