COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: andy_mason_84 on 10 Jul 2015 02:59:03 AM

Title: MDX: Show level below unless at bottom level
Post by: andy_mason_84 on 10 Jul 2015 02:59:03 AM
Hi All,

Basically I have a cube based report.  One which has some inline prompts so the user can change what is in the rows and columns.  Nothing special.

So the user can select either level in the companies hierarchy: -
Company Group
Company

So I have a data item called [Rows] which gives you Company Group or Company depending on what you want to see in the report but I want a [Sub-Level] Data item so that if they select Company Group it will show the level below which is Company however if they select Company then I want it to show Company as well.

If I use descendants([Rows],1) this works for Company Group but when I select Company it shows no data as there are no levels below.

Any ideas what I can do?  It is probably something so simple!

Cheers,

AM