COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: bonniehsueh on 28 Jun 2010 04:27:40 PM

Title: Using CurrentMember in the Order MDX Function?
Post by: bonniehsueh on 28 Jun 2010 04:27:40 PM
I'm trying to use the currentMember function in the order function, but am getting this error when I use the currentMember function.

PCA-ERR-0062 The "currentMember" node is not expected to be a "qs:member". 

This is the expression I'm using: order(currentMember([great_outdoors_company].[Products].[Products]),#prompt('pSortColumn','token','tuple([Americas],[Americas Current],[Revenue])')#,desc)

Since members can be used in the set expression of the Order function, I would expect the currentMember function should also be compatible.

What am I missing? Any ideas would be appreciated! 

Thanks in advance.
Title: Re: Using CurrentMember in the Order MDX Function?
Post by: CognosPaul on 29 Jun 2010 01:15:12 AM
First question, is this a real cube or DMR?

The currentMember will always return a single member, order will work with a single member, but it won't do anything. Try order(children(currentMember([great_outdoors_company].[Products].[Products])),#prompt('pSortColumn','token','tuple([Americas],[Americas Current],[Revenue])')#,desc)