If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Substring for Cube members

Started by lebronjames, 09 Feb 2009 03:34:17 PM

Previous topic - Next topic

lebronjames

Hi,
I am making a report using a cube. I have a string field that I want to cut a little bit to make it fit better.

Usually i would just go to the Data Item expression editor and use the substring function.

But with cube members, I cannot see this option. Please help.

Thanks.

rockytopmark

If you have attributes of the level available (from a cube, you should have label, short desc, description, to name a few... these are strings and you can probably leverage the substring function on those.  If you use Members, Hierarhcies or Levels, you are not dealing with strings.

lebronjames

Thats good info Rocky. I am using members.

Is there any way to concatenate those??

Gollapudi

Hi,

If you wanna use substring with Cube members you should use "Caption" function along.

Ex: substring(caption([great_outdoors_company].[Products].[Products].[Product line]),1,2)

Thanks,
Venu.

jhilley

if I use Caption([Account]) then the query runs in 2 sec.
when I add substring(caption([Account]),1,5) then the query either does not run or takes forever to run.... any ideas?

[Account] is a level in the Chart Hierarchy
Thanks

billylodz

for Level Account you should have Account - Long Name, it's string