COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: kgcognos on 07 Feb 2018 01:02:41 PM

Title: Rank This Year vs Last Year Sales
Post by: kgcognos on 07 Feb 2018 01:02:41 PM
I need to show the customer sales ranking this year compared to last year sales. We are using Dimensional table.
In my crosstab, customer is the row, TY Sales and LY Sales for the columns.
Measures for TY Sales : Rank#, Sales $
Measures for LY Sales : Rank#, Sales $

When I include TY Sales only as column, the report shows the rank and Sales $
But when I add LY Sales column, TY and LY Rank # are showing all 1. TY and LY Sales $ are showing blank.

Please help how to resolve.

Thank you in advance. 
Title: Re: Rank This Year vs Last Year Sales
Post by: MFGF on 08 Feb 2018 02:25:30 AM
Quote from: kgcognos on 07 Feb 2018 01:02:41 PM
I need to show the customer sales ranking this year compared to last year sales. We are using Dimensional table.
In my crosstab, customer is the row, TY Sales and LY Sales for the columns.
Measures for TY Sales : Rank#, Sales $
Measures for LY Sales : Rank#, Sales $

When I include TY Sales only as column, the report shows the rank and Sales $
But when I add LY Sales column, TY and LY Rank # are showing all 1. TY and LY Sales $ are showing blank.

Please help how to resolve.

Thank you in advance.

Hi,

Can you tell us how you are deriving the rank? Is TY Sales a calculation in your report or is it a measure in your package? If the first, how are you calculating it?

MF.
Title: Re: Rank This Year vs Last Year Sales
Post by: kgcognos on 09 Feb 2018 09:56:02 AM
Hi,

Thanks for replying.

TY Sales(YTD) and LY Sales(Last YTD) are coming from our time dimension.
Rank# = rank ([Sales - USD])   -- Sales USD is a measure
Sales $ = [Sales - USD]            -- Sales USD is a measure



Title: Re: Rank This Year vs Last Year Sales
Post by: MFGF on 09 Feb 2018 10:45:50 AM
Quote from: kgcognos on 09 Feb 2018 09:56:02 AM
Hi,

Thanks for replying.

TY Sales(YTD) and LY Sales(Last YTD) are coming from our time dimension.
Rank# = rank ([Sales - USD])   -- Sales USD is a measure
Sales $ = [Sales - USD]            -- Sales USD is a measure

So, just to be clear, you are using a dimensional package, and TY and LY are from the Time Dimension?

What do you see if you change the expression of your Rank# calculation to be rank([Sales - USD] within set [customer])

[customer] above is the set of customer members you are using in the rows

Cheers!

MF.
Title: Re: Rank This Year vs Last Year Sales
Post by: kgcognos on 09 Feb 2018 04:04:28 PM
MFGF Thank you so much!!!

Yes it is working now. Thank you again!