COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gegoel on 24 Aug 2012 02:03:59 PM

Title: Substring/ truncate level headers in crosstab & tree prompt -TM1 Cube
Post by: gegoel on 24 Aug 2012 02:03:59 PM
Hello All,

In one of our dimension heirarchy, we have few numbers in front of text at 2 levels (e.g. "1919U: Americas") . This was necessary to do in TM1 in order to make those unique identifiers (example in attached screenshot). We are looking ways to truncate those in Report studio so that only text/ name shows ( U: Americas) in both places - tree prompt and in crosstab rows. We tried couple of ways but have been unscuccessful. Challenge is how to get text w/o numbers to show when this hierarchy is set as row and drill-down happens from level 1. Please advise. 

Thanks for your help on this in advance.
Title: Re: Substring/ truncate level headers in crosstab & tree prompt -TM1 Cube DMR
Post by: tjohnson3050 on 24 Aug 2012 04:00:01 PM
Just an FYI DMR is dimensionally modeled relational data.  That is when you apply an OLAP view over the relational data in Framework Manager.  TM1 is an in memory cube which is different than DMR.

In order to do text functions against a member, you first need to specify that you want to work with the caption of that member.

caption([member unique name])

So instead of doing substring([xyz],1,4), you would do substring(caption([xyz]),1,4)
Title: Re: Substring/ truncate level headers in crosstab & tree prompt -TM1 Cube
Post by: gegoel on 27 Aug 2012 08:11:41 AM
 @ tjohnson3050 - Thanks for your response. I can use the substring on caption as you suggested if I am pulling different levels of hiearachy in the crosstab in different columns. But if user drills down from the top level to level 2 member which have those numbers in name, how do we remove that? Same holds when the heirarchy is in tree prompt. How do I make level 2 and level 3 names appear in tree heirarchy w/o those numbers? Please advise.
Title: Re: Substring/ truncate level headers in crosstab & tree prompt -TM1 Cube
Post by: tjohnson3050 on 27 Aug 2012 09:48:17 AM
Use alias tables in TM1 to create alternate captions for the member of your hierarchy:

http://publib.boulder.ibm.com/infocenter/ctm1/v9r4m1/index.jsp?topic=/com.ibm.swg.im.cognos.tm1_dg_dvlpr.9.4.1.doc/tm1_dg_dvlpr_id634ElementAttributes_N803CB.html