COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Transformer => Topic started by: karthik.kadambi on 17 Aug 2014 03:26:30 AM

Title: Do a Top 10 after drill-down?
Post by: karthik.kadambi on 17 Aug 2014 03:26:30 AM
Hello All,

I have a scenario where I'm doing a very straightforward method of doing a Top 10 of a crosstab member row using order() and subset(). But when I do a drill-down it loses the Top 10 functionality and brings back all members belonging to the level beneath.

Here's how I tried to solve -

In the Drill Behavior property window, I've tried the 'Replace Expression' option which takes the currentMember of the item that I'm trying to drill down and do a Top 10 using MDX. It sorta works when I have selected individual level members in the Tree Prompt selection.

I'm having a problem when I do a Product(All) selection in the Tree Prompt. Even though I'm bringing the descendants of the All level on to the Report, a drill-down on individual members gives a currentMember as the All level and not the actual member that's being drill-down. The All level is important to have as it's easier for the Business to select.
I can remove the All level in Tree Prompt, but a feature that doesn't exist within Tree Prompt is the 'Select All' link, which would have helped my case.
Title: Re: Do a Top 10 after drill-down?
Post by: skeith99 on 18 Aug 2014 03:57:39 PM
Have you tried using the TopRank function?
Title: Re: Do a Top 10 after drill-down?
Post by: skeith99 on 19 Aug 2014 02:01:44 PM
Karthik,   I found an example in the Cognos Tips and Techniques section.

http://www.ibm.com/developerworks/data/library/cognos/page104.html

The trick is to use Named Sets and setting the drill down behavior correctly.  I was able to create the report functionality using the example in the link.

Let me know how it goes.

Scott