## MDX Question - Calculated Measure

### MDX Question - Calculated Measure

Does anyone know if I can do the following calculation in
AS, and if so how.
I am trying to calculate delq. %, however I have cycles
delq. as a dimension.

What I need to do would be something like this:
Total Balances / n cycle past due balance

Thanks for any help.

### MDX Question - Calculated Measure

Hi John,

I'm afraid I'm not too sure if I understand the question correctly - are you
trying to calculate the a measure based on a dimension against the total
amount of that dimension?  If this is what you are trying to calculate,
here's some MDX I've written to do this based on the HR cube within the
Foodmart 2000 database:
with
member [Measures].[All Count] as '([Measures].[Count], [Department].[All
Department])'
member [Measures].[Calculation] as '([Measures].[Count]/[Measures].[All
Count])', FORMAT_STRING='0.00%'
select {
[Measures].[Count]
,[Measures].[All Count]
,[Measures].[Calculation]

Quote:} on columns, {

[Department].children
Quote:} on rows

from [HR]

Note, the [Measures].[All Count] is a calculated member that determines the
total [Measures].[Count] value for the entire department dimension (instead
of it being broken out). This calculated member allows us to create the
[Measures].[Calculation] calculated member which will allow you to calculate
each dimension member's count against the overall count.

If this is not the case, could you please clarify what it is you would like
to solve?

Regards,
denny :-)

Quote:> Does anyone know if I can do the following calculation in
> AS, and if so how.
> I am trying to calculate delq. %, however I have cycles
> delq. as a dimension.

> What I need to do would be something like this:
> Total Balances / n cycle past due balance

> Thanks for any help.

### MDX Question - Calculated Measure

Denny,
measure with the below formula but I get a syntax error.
Do you know why?

[Measures].[Accounts],[Account Age].[All]

Thanks again,
John

[Measures].[Accounts],[Account Age].[All]

Quote:>-----Original Message-----
>Hi John,

>I'm afraid I'm not too sure if I understand the question
correctly - are you
>trying to calculate the a measure based on a dimension
against the total
>amount of that dimension?  If this is what you are trying
to calculate,
>here's some MDX I've written to do this based on the HR
cube within the
>Foodmart 2000 database:
>with
>member [Measures].[All Count] as '([Measures].[Count],
[Department].[All
>Department])'
>member [Measures].[Calculation] as '([Measures].[Count]/
[Measures].[All
>Count])', FORMAT_STRING='0.00%'
>select {
>  [Measures].[Count]
> ,[Measures].[All Count]
> ,[Measures].[Calculation]
>} on columns, {
>  [Department].children
>} on rows
>from [HR]

>Note, the [Measures].[All Count] is a calculated member
that determines the
>total [Measures].[Count] value for the entire department
>of it being broken out). This calculated member allows us
to create the
>[Measures].[Calculation] calculated member which will

allow you to calculate

- Show quoted text -

>each dimension member's count against the overall count.

>If this is not the case, could you please clarify what it
is you would like
>to solve?

>Regards,
>denny :-)

>> Does anyone know if I can do the following calculation
in
>> AS, and if so how.
>> I am trying to calculate delq. %, however I have cycles
>> delq. as a dimension.

>> What I need to do would be something like this:
>> Total Balances / n cycle past due balance

>> Thanks for any help.

>.

### MDX Question - Calculated Measure

Oh, this depends on the way you've setup the dimension - but I believe the
syntax of below is
([Measures].[Accounts], [Account Age].[All Account Age])

HTH!

> Denny,
> Thanks for your reply. I tried to create the total count
> measure with the below formula but I get a syntax error.
> Do you know why?

> [Measures].[Accounts],[Account Age].[All]

> Thanks again,
> John

> [Measures].[Accounts],[Account Age].[All]
> >-----Original Message-----
> >Hi John,

> >I'm afraid I'm not too sure if I understand the question
> correctly - are you
> >trying to calculate the a measure based on a dimension
> against the total
> >amount of that dimension?  If this is what you are trying
> to calculate,
> >here's some MDX I've written to do this based on the HR
> cube within the
> >Foodmart 2000 database:
> >with
> >member [Measures].[All Count] as '([Measures].[Count],
> [Department].[All
> >Department])'
> >member [Measures].[Calculation] as '([Measures].[Count]/
> [Measures].[All
> >Count])', FORMAT_STRING='0.00%'
> >select {
> >  [Measures].[Count]
> > ,[Measures].[All Count]
> > ,[Measures].[Calculation]
> >} on columns, {
> >  [Department].children
> >} on rows
> >from [HR]

> >Note, the [Measures].[All Count] is a calculated member
> that determines the
> >total [Measures].[Count] value for the entire department
> >of it being broken out). This calculated member allows us
> to create the
> >[Measures].[Calculation] calculated member which will
> allow you to calculate
> >each dimension member's count against the overall count.

> >If this is not the case, could you please clarify what it
> is you would like
> >to solve?

> >Regards,
> >denny :-)

> >> Does anyone know if I can do the following calculation
> in
> >> AS, and if so how.
> >> I am trying to calculate delq. %, however I have cycles
> >> delq. as a dimension.

> >> What I need to do would be something like this:
> >> Total Balances / n cycle past due balance

> >> Thanks for any help.

> >.

I want to create a calculated measure conditionally based on the value of
one of the cubes measures. Basically, I want to be able to count \$0 values.
I am still new to MDX, but have read everything I can and only seem to get
similar examples if the condition also includes a dimension. I'm sure this
has to be simpler than I am making it.

Steve