COGNOiSe.com - The IBM Cognos Community

Planning & Consolidation => TM1 => Topic started by: jburchill on 31 Oct 2018 01:18:15 PM

Title: Where does the Caption function pull its data from?
Post by: jburchill on 31 Oct 2018 01:18:15 PM
I have this expression and trying to figure out where the caption is coming from:

filter(members([Projects].[Projects].[Projects]),(caption([Projects].[Projects].[Projects]) in('Test Project')))

I have three members that deal with projects name, "Number and Name", "Name and Number", "Projects-Name". The caption only matches what is in "Name and Number"  Can I change where Caption function is searching for project name?

Thank you,
Title: Re: Where does the Caption function pull its data from?
Post by: MFGF on 01 Nov 2018 03:45:42 AM
Quote from: jburchill on 31 Oct 2018 01:18:15 PM
I have this expression and trying to figure out where the caption is coming from:

filter(members([Projects].[Projects].[Projects]),(caption([Projects].[Projects].[Projects]) in('Test Project')))

I have three members that deal with projects name, "Number and Name", "Name and Number", "Projects-Name". The caption only matches what is in "Name and Number"  Can I change where Caption function is searching for project name?

Thank you,

Hi,

It looks to me like the expression is currently scanning through the entire Projects hierarchy looking for members at any level whose caption is 'Test Project'. Can you elaborate on what you mean by "I have three members that deal with projects name"? Do you mean you have three levels?

MF.
Title: Re: Where does the Caption function pull its data from?
Post by: jburchill on 01 Nov 2018 08:38:05 AM
sorry if I'm using wrong terminology, but here is a screenshot of what I'm talking about.  I thought they were called members.
Title: Re: Where does the Caption function pull its data from?
Post by: MFGF on 01 Nov 2018 10:17:12 AM
Quote from: jburchill on 01 Nov 2018 08:38:05 AM
sorry if I'm using wrong terminology, but here is a screenshot of what I'm talking about.  I thought they were called members.

Ah - no. They are attributes. A member has an ID, a Caption and possibly some other attributes. These are what we are seeing here. They are not captions.

I'm not quite sure on what the real requirement is here? Are you trying to find members which have 'Test Project' in a specified one of the three attributes?

If so, you could try the following approach:

filter(members([Projects].[Projects].[Projects]), <drag in your desired attribute> in ('Test Project'))

Or are you looking for something else?

Cheers!

MF.