Author Topic: Where does the Caption function pull its data from?  (Read 136 times)

Offline jburchill

  • Full Member
  • ***
  • Join Date: May 2012
  • Posts: 38
  • Forum Citizenship: +0/-0
Where does the Caption function pull its data from?
« 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,

Offline MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 10,411
  • Forum Citizenship: +627/-10
  • Cognos Software Muppet
Re: Where does the Caption function pull its data from?
« Reply #1 on: 01 Nov 2018 03:45:42 am »
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.
Meep!

Offline jburchill

  • Full Member
  • ***
  • Join Date: May 2012
  • Posts: 38
  • Forum Citizenship: +0/-0
Re: Where does the Caption function pull its data from?
« Reply #2 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.

Offline MFGF

  • Never knowingly correct
  • Super Moderator
  • Statesman
  • ******
  • Join Date: Jul 2005
  • Posts: 10,411
  • Forum Citizenship: +627/-10
  • Cognos Software Muppet
Re: Where does the Caption function pull its data from?
« Reply #3 on: 01 Nov 2018 10:17:12 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.
Meep!

 


       
Twittear