COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: ersin.gulbahar on 13 Nov 2014 03:41:13 AM

Title: How can I use total function for a member.(source : TM1 / Cognos 10.2.1)
Post by: ersin.gulbahar on 13 Nov 2014 03:41:13 AM
Hi experts,
I set expression like this :

filter ( levels([my].[hierarchy].[here],3) ,caption(parent(currentMember([my].[hierarchy].[here]))) ='TEST' )

(name is MyItem)


it works as I expect.

But I want to  get its total measure. So If I use total(MyItem) it gives error.

How can I solve this?

thanks in advance
Title: Re: How can I use total function for a member.(source : TM1 / Cognos 10.2.1)
Post by: MFGF on 13 Nov 2014 06:07:19 AM
Quote from: ersin.gulbahar on 13 Nov 2014 03:41:13 AM
Hi experts,
I set expression like this :

filter ( levels([my].[hierarchy].[here],3) ,caption(parent(currentMember([my].[hierarchy].[here]))) ='TEST' )

(name is MyItem)


it works as I expect.

But I want to  get its total measure. So If I use total(MyItem) it gives error.

How can I solve this?

thanks in advance

How about:

aggregate( currentMeasure within set filter ( levels([my].[hierarchy].[here],3) ,caption(parent(currentMember([my].[hierarchy].[here]))) ='TEST' ))

MF.
Title: Re: How can I use total function for a member.(source : TM1 / Cognos 10.2.1)
Post by: ersin.gulbahar on 13 Nov 2014 06:18:10 AM
Thanks for answer,
should I write it in data item or query calculation ? When I write in data item it gives error invalidmx ...

thanks in advance
Title: Re: How can I use total function for a member.(source : TM1 / Cognos 10.2.1)
Post by: MFGF on 13 Nov 2014 06:44:38 AM
Quote from: ersin.gulbahar on 13 Nov 2014 06:18:10 AM
Thanks for answer,
should I write it in data item or query calculation ? When I write in data item it gives error invalidmx ...

thanks in advance

What is the error?
Title: Re: How can I use total function for a member.(source : TM1 / Cognos 10.2.1)
Post by: ersin.gulbahar on 13 Nov 2014 06:48:50 AM
Error is :

XQE-GEN-0010 Found an internal error "XQERuntimeException": XTM-ERR-003 The MDX query submitted to TM1 server failed during execution. The TM1 error code is  InvalidMDXExpression.