COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: kado on 29 Apr 2010 12:25:05 AM

Title: MEMBERS - cube, hierarchy, level
Post by: kado on 29 Apr 2010 12:25:05 AM
 ???
Has anyone had any luck with the MEMBERS function?

I have tried a number of different things and think my syntax is correct whereas I want to pull all members from 1 level of a hierarchy:

members([Finance_Cube_Source].[VS].[VS], [Approved])

The above syntax gets the following error:

  An invalid number of operands was specified for the operator 'members' in the dataItem 'dataItem="AH2"'.

Any thoughts?

thanks,
kado
Title: Re: MEMBERS - cube, hierarchy, level
Post by: CognosPaul on 29 Apr 2010 01:44:27 AM
The members function will accept either hierarchies or levels. (pipes "|" in the tips means "or")

Normally you wouldn't need to use the members function. It is applied automatically when you reference a level or a hierarchy (depending on context of course). Putting [Cube].[Date].[Date].[Year] into a data item is exactly the same as members([Cube].[Date].[Date].[Year]).
Title: Re: MEMBERS - cube, hierarchy, level
Post by: kado on 29 Apr 2010 02:00:18 AM
Thanks, that makes sense!

;D