COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: James111 on 16 Nov 2009 08:44:40 AM

Title: Issues with the Rank function
Post by: James111 on 16 Nov 2009 08:44:40 AM
Hi,
I'm having a problem with the rank function and I'd really appriciate some help.

I have a chart which displays a column for each "Form" in the X axis and counts the amount of entries for each form in the Y axis. For the series I'm using a "Branch" data item which is a part of a dimension which represents my company's Hirarchy. The cube I'm using looks something like this:

| Hirarchy | Entries |  <---Dimensions
|---------|--------|
|Company |  Entry  |  <---Levels
| Branch   |           |
| Section  |           |
|  Team    |           |

AmountOfEntries - A Measure counting the amount of entires to each form


What I want to do is to show only the top 10 forms, but instead of ranking the levels (columns), the report ranks each member of the level seperatly. The filter I use is: "rank([AmountOfEntries]) <= 10".

Hope this makes any sense..
Title: Re: Issues with the Rank function
Post by: Sreeni P on 16 Nov 2009 10:13:27 AM
it's simple , if u r creating the filter "before auto aggregation" it won't work, make this filter as ''after aggregation", hope this wil work for ur requirement
Title: Re: Issues with the Rank function
Post by: James111 on 17 Nov 2009 12:42:54 AM
When I set it to "After Auto Aggregation" I get the following error when running the report:
"The FOR clause of 'total' must reflect the left to right order of query items up to and including the item that specifies the control break for the function".

Any ideas?
Title: Re: Issues with the Rank function
Post by: James111 on 17 Nov 2009 06:29:16 AM
Nevermind I got it, Thanks alot.
Title: Re: Issues with the Rank function
Post by: Sreeni P on 17 Nov 2009 10:24:44 AM
can u let me know how did u got it?never mind , cya
Title: Re: Issues with the Rank function
Post by: sandeep8000861 on 19 Nov 2009 07:43:39 AM
Hi James111,

I am also having a similar issue with Ranks in a combinational chart.

Can you please help me understand this and hopefully suggest a workaround that you used in your report...?