COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: backhandx on 16 Jan 2017 04:37:04 AM

Title: MemberCaption expression
Post by: backhandx on 16 Jan 2017 04:37:04 AM
Hi all,
I am investigating an existing framework which normally works.
In the dimensional layer, the modeler of the framework created the member caption attributes like this ( see the attached file please):

[path of the attribute ][BusinessKey] + || [path of the attribute ][Label]. ( without using cast function)

These two attributes are from the same hierarchy H where we were creating the member Caption.
I am wondering if is this a proper way to create member caption?
Thanks
Title: Re: MemberCaption expression
Post by: MFGF on 16 Jan 2017 04:44:02 AM
Quote from: backhandx on 16 Jan 2017 04:37:04 AM
Hi all,
I am investigating an existing framework which normally works.
In the dimensional layer, the modeler of the framework created the member caption attributes like this ( see the attached file please):

[path of the attribute ][BusinessKey] + || [path of the attribute ][Label]. ( without using cast function)

These two attributes are from the same hierarchy H where we were creating the member Caption.
I am wondering if is this a proper way to create member caption?
Thanks

That would work if the BusinessKey attribute is a character value, but not if it was some sort of numeric. Is the concatenation a + or a || - you are showing both? Would it make sense to have the business key and label concatenated together with nothing between them?

MF.
Title: Re: MemberCaption expression
Post by: backhandx on 16 Jan 2017 04:51:42 AM
Actually the Concatenation is done by:   || ' - ' ||.
But I'm getting this error in the box below:

QE-DEF-0030 Expression parsing error.
QE-DEF-0359 The query contains a reference to at least one object '.[H].[H].[Business Key]' that does not exist.

Although it works in report.
Title: Re: MemberCaption expression
Post by: MFGF on 16 Jan 2017 09:04:01 AM
Quote from: backhandx on 16 Jan 2017 04:51:42 AM
Actually the Concatenation is done by:   || ' - ' ||.
But I'm getting this error in the box below:

QE-DEF-0030 Expression parsing error.
QE-DEF-0359 The query contains a reference to at least one object '.[H].[H].[Business Key]' that does not exist.

Although it works in report.

Hi,

I'd expect to see an expression like this:

[Namespace].[Dimension].[Hierarchy].[Level].[Attribute1]  || ' -' || [Namespace].[Dimension].[Hierarchy].[Level].[Attribute2] 

Your expression doesn't appear to conform to this?

MF.
Title: Re: MemberCaption expression
Post by: CognosPaul on 16 Jan 2017 11:16:41 AM
It's been a long time since I've worked with DMR, but isn't it usually better to build the captions with references to the relational dim table?

[Namespace].[Table].[Field] + ' - ' + [Namespace].[Table].[Field2]
Title: Re: MemberCaption expression
Post by: backhandx on 16 Jan 2017 04:29:37 PM
Quote from: MFGF on 16 Jan 2017 09:04:01 AM
Hi,

I'd expect to see an expression like this:

[Namespace].[Dimension].[Hierarchy].[Level].[Attribute1]  || ' -' || [Namespace].[Dimension].[Hierarchy].[Level].[Attribute2] 

Your expression doesn't appear to conform to this?

MF.
Actually it is defined as you mentionned. Is it proper to do it this way?