Skip to Content
author's profile photo Former Member
Former Member

Average formula

Hi there,

I am trying to tweak a MDX formula to compute an average of base members excluding those with a specific property value.

To make it clear, assume I have an account A stored and need to calculate an account B which is the average of A of all base TIME members below the current TIME member excluding members that have the PERIOD property equal to "AUD".

Without the excluding, I get it to work with the following formula:

'IIF([TIME].Currentmember.Properties("CALC")="Y",AVG(Descendants([TIME].CurrentMember,,LEAVES),[ACCOUNT].[BANKBALCASH]),[ACCOUNT].[BANKBALCASH]),SOLVE_ORDER=2

But when I try to filter out like this, it won't work:

'IIF([TIME].Currentmember.Properties("CALC")="Y",AVG(Filter(Descendants([TIME].CurrentMember,,LEAVES),[TIME].[PERIOD]<>"AUD"),[ACCOUNT].[BANKBALCASH]),[ACCOUNT].[BANKBALCASH]),SOLVE_ORDER=2

Thanks,

Regis

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2010 at 12:32 PM

    Hi Regis,

    Are you trying

    IIF(TIME.Currentmember.Properties("CALC")="Y",AVG(Filter(Descendants
    (TIME.CurrentMember,,LEAVES),[TIME].[PERIOD]
    <>"AUD"),ACCOUNT.BANKBALCASH),ACCOUNT.BANKBALCASH),SOLVE_ORDER=
    2

    There is a not equal to sign between

    [TIME].[PERIOD] and "AUD"

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.