dbTalk Databases Forums  

Error Designing Caluclated Member

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Error Designing Caluclated Member in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
GH
 
Posts: n/a

Default Error Designing Caluclated Member - 09-08-2005 , 10:58 AM






I am trying this expression in the Calculated Member Builder

[Measures].[Cost]/[Building].[Head Count]

And I get the following error:

Unable to update the calculated member.
Formula error - cannot bind: unknown dimension or member: "[Building].[Head
Count]"

This seems simple unless I cannot use a dimension member in the calculation.

Thanks in advance
GH

Reply With Quote
  #2  
Old   
GH
 
Posts: n/a

Default RE: Error Designing Caluclated Member - 09-08-2005 , 05:38 PM






I have figured out the binding issue ... is really telling me i have a poorly
formed MDX expression.

I am not trying this test expression as my Calculated Member:
(Calendar.CurrentMember).[Location].[Head Count]

This is returning an #err in all cells returned.

My challenge is finding Cost\Person

I have the following dimensions:
Calendar with Date/Year/QTR/Month/MonthDay/WeekDay
Location with Area/Region/District/Branch/Building/HeadCount

The fact table fctCosts with the measures FixedCost,VriblCost

I want to be able to add the Calculated Member Cost/person where (FixedCost
+ VrblCost) / HeadCount = Cost\Person

But I cannot get the value of (Calendar.CurrentMember).[Location].[Head
Count] to print.
--
Thanks in advance
GH


"GH" wrote:

Quote:
I am trying this expression in the Calculated Member Builder

[Measures].[Cost]/[Building].[Head Count]

And I get the following error:

Unable to update the calculated member.
Formula error - cannot bind: unknown dimension or member: "[Building].[Head
Count]"

This seems simple unless I cannot use a dimension member in the calculation.

Thanks in advance
GH

Reply With Quote
  #3  
Old   
Peter Yang [MSFT]
 
Posts: n/a

Default RE: Error Designing Caluclated Member - 09-09-2005 , 05:29 AM



Hello,

To understand the issue better, I'd like to know the detailed meaning of
HeadCount. Is it a member property of building member? Or they are staffs
in the building?

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===



This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
Quote:
Thread-Topic: Error Designing Caluclated Member
thread-index: AcW0xgKC3VR1obzsTCa1QBFjxi7b1Q==
X-WBNR-Posting-Host: 131.107.0.79
From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
Subject: RE: Error Designing Caluclated Member
Date: Thu, 8 Sep 2005 15:38:18 -0700
Lines: 42
Message-ID: <3BB9D044-DB7F-448F-B836-CE26EF4B3A19 (AT) microsoft (DOT) com
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.sqlserver.olap
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.olap:62587
X-Tomcat-NG: microsoft.public.sqlserver.olap

I have figured out the binding issue ... is really telling me i have a
poorly
formed MDX expression.

I am not trying this test expression as my Calculated Member:
(Calendar.CurrentMember).[Location].[Head Count]

This is returning an #err in all cells returned.

My challenge is finding Cost\Person

I have the following dimensions:
Calendar with Date/Year/QTR/Month/MonthDay/WeekDay
Location with Area/Region/District/Branch/Building/HeadCount

The fact table fctCosts with the measures FixedCost,VriblCost

I want to be able to add the Calculated Member Cost/person where
(FixedCost
+ VrblCost) / HeadCount = Cost\Person

But I cannot get the value of (Calendar.CurrentMember).[Location].[Head
Count] to print.
--
Thanks in advance
GH


"GH" wrote:

I am trying this expression in the Calculated Member Builder

[Measures].[Cost]/[Building].[Head Count]

And I get the following error:

Unable to update the calculated member.
Formula error - cannot bind: unknown dimension or member:
"[Building].[Head
Count]"

This seems simple unless I cannot use a dimension member in the
calculation.

Thanks in advance
GH



Reply With Quote
  #4  
Old   
GH
 
Posts: n/a

Default RE: Error Designing Caluclated Member - 09-09-2005 , 08:49 AM



Headcount is the number of staff permanetly assigned to that building.

So if the annual total costs of the building is $100,000 and the Headcount
is 10 then the Annual CostPerPerson will be $10,000.
--
Thanks in advance
GH


"Peter Yang [MSFT]" wrote:

Quote:
Hello,

To understand the issue better, I'd like to know the detailed meaning of
HeadCount. Is it a member property of building member? Or they are staffs
in the building?

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===



This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| Thread-Topic: Error Designing Caluclated Member
| thread-index: AcW0xgKC3VR1obzsTCa1QBFjxi7b1Q==
| X-WBNR-Posting-Host: 131.107.0.79
| From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
| Subject: RE: Error Designing Caluclated Member
| Date: Thu, 8 Sep 2005 15:38:18 -0700
| Lines: 42
| Message-ID: <3BB9D044-DB7F-448F-B836-CE26EF4B3A19 (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.olap
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.olap:62587
| X-Tomcat-NG: microsoft.public.sqlserver.olap
|
| I have figured out the binding issue ... is really telling me i have a
poorly
| formed MDX expression.
|
| I am not trying this test expression as my Calculated Member:
| (Calendar.CurrentMember).[Location].[Head Count]
|
| This is returning an #err in all cells returned.
|
| My challenge is finding Cost\Person
|
| I have the following dimensions:
| Calendar with Date/Year/QTR/Month/MonthDay/WeekDay
| Location with Area/Region/District/Branch/Building/HeadCount
|
| The fact table fctCosts with the measures FixedCost,VriblCost
|
| I want to be able to add the Calculated Member Cost/person where
(FixedCost
| + VrblCost) / HeadCount = Cost\Person
|
| But I cannot get the value of (Calendar.CurrentMember).[Location].[Head
| Count] to print.
| --
| Thanks in advance
| GH
|
|
| "GH" wrote:
|
| > I am trying this expression in the Calculated Member Builder
|
| > [Measures].[Cost]/[Building].[Head Count]
|
| > And I get the following error:
|
| > Unable to update the calculated member.
| > Formula error - cannot bind: unknown dimension or member:
"[Building].[Head
| > Count]"
|
| > This seems simple unless I cannot use a dimension member in the
calculation.
|
| > Thanks in advance
| > GH
|



Reply With Quote
  #5  
Old   
GH
 
Posts: n/a

Default RE: Error Designing Caluclated Member - 09-09-2005 , 07:00 PM



HI Peter,

My latest approach is to make the Headcount a Member Property of the
BuildingName.

Then when using the CalculatedMemberBuilder to create a calculated measure
or Member using MDX expression
[Location_HC].CurrentMember.Properties("HeadCount") returns a #ERR in the
grid.
--
Thanks in advance
GH


"GH" wrote:

Quote:
Headcount is the number of staff permanetly assigned to that building.

So if the annual total costs of the building is $100,000 and the Headcount
is 10 then the Annual CostPerPerson will be $10,000.
--
Thanks in advance
GH


"Peter Yang [MSFT]" wrote:

Hello,

To understand the issue better, I'd like to know the detailed meaning of
HeadCount. Is it a member property of building member? Or they are staffs
in the building?

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===



This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| Thread-Topic: Error Designing Caluclated Member
| thread-index: AcW0xgKC3VR1obzsTCa1QBFjxi7b1Q==
| X-WBNR-Posting-Host: 131.107.0.79
| From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
| Subject: RE: Error Designing Caluclated Member
| Date: Thu, 8 Sep 2005 15:38:18 -0700
| Lines: 42
| Message-ID: <3BB9D044-DB7F-448F-B836-CE26EF4B3A19 (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.olap
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.olap:62587
| X-Tomcat-NG: microsoft.public.sqlserver.olap
|
| I have figured out the binding issue ... is really telling me i have a
poorly
| formed MDX expression.
|
| I am not trying this test expression as my Calculated Member:
| (Calendar.CurrentMember).[Location].[Head Count]
|
| This is returning an #err in all cells returned.
|
| My challenge is finding Cost\Person
|
| I have the following dimensions:
| Calendar with Date/Year/QTR/Month/MonthDay/WeekDay
| Location with Area/Region/District/Branch/Building/HeadCount
|
| The fact table fctCosts with the measures FixedCost,VriblCost
|
| I want to be able to add the Calculated Member Cost/person where
(FixedCost
| + VrblCost) / HeadCount = Cost\Person
|
| But I cannot get the value of (Calendar.CurrentMember).[Location].[Head
| Count] to print.
| --
| Thanks in advance
| GH
|
|
| "GH" wrote:
|
| > I am trying this expression in the Calculated Member Builder
|
| > [Measures].[Cost]/[Building].[Head Count]
|
| > And I get the following error:
|
| > Unable to update the calculated member.
| > Formula error - cannot bind: unknown dimension or member:
"[Building].[Head
| > Count]"
|
| > This seems simple unless I cannot use a dimension member in the
calculation.
|
| > Thanks in advance
| > GH
|



Reply With Quote
  #6  
Old   
Peter Yang [MSFT]
 
Posts: n/a

Default RE: Error Designing Caluclated Member - 09-12-2005 , 03:55 AM



Hello,

Because the headcount is only the member properties of the leaf level of
location dimension, there will be error if you use them directly in
caculated member. You may want to try the following MDX:

With
Member Measures.[headcount] As
' IIf
(
IsLeaf ( location.CurrentMember ),
val( location.CurrentMember.Properties("headcount") ),
Sum
(
Descendants( location.CurrentMember,,Leaves ),
Measures.[store sqft]
)
) '

Member Measures.[Cost Per headcount] As
' Measures.[store sales] / Measures.[headcount] '

select
{ Measures.[headcount], Measures.[Cost Per headcount] } on columns,
NON EMPTY [location].[building].members on rows
from costcube

Hope this is helpful.

Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
Quote:
Thread-Topic: Error Designing Caluclated Member
thread-index: AcW1mpfCZep34eQLR3WoxR7d3sDR2Q==
X-WBNR-Posting-Host: 131.107.0.79
From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
3BB9D044-DB7F-448F-B836-CE26EF4B3A19...soft (DOT) com
<udRVilStFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl>
<C8FA01CE-9763-4977-8344-5EE0197F96C2 (AT) microsoft (DOT) com>
Quote:
Subject: RE: Error Designing Caluclated Member
Date: Fri, 9 Sep 2005 17:00:02 -0700
Lines: 123
Message-ID: <AF5113B7-374B-4F2D-8391-B7B74BB6A7C7 (AT) microsoft (DOT) com
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.sqlserver.olap
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:14373
X-Tomcat-NG: microsoft.public.sqlserver.olap

HI Peter,

My latest approach is to make the Headcount a Member Property of the
BuildingName.

Then when using the CalculatedMemberBuilder to create a calculated
measure
or Member using MDX expression
[Location_HC].CurrentMember.Properties("HeadCount") returns a #ERR in the
grid.
--
Thanks in advance
GH


"GH" wrote:

Headcount is the number of staff permanetly assigned to that building.

So if the annual total costs of the building is $100,000 and the
Headcount
is 10 then the Annual CostPerPerson will be $10,000.
--
Thanks in advance
GH


"Peter Yang [MSFT]" wrote:

Hello,

To understand the issue better, I'd like to know the detailed meaning
of
HeadCount. Is it a member property of building member? Or they are
staffs
in the building?

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader
so
that others may learn and benefit from your issue.

================================================== ===



This posting is provided "AS IS" with no warranties, and confers no
rights.


--------------------
| Thread-Topic: Error Designing Caluclated Member
| thread-index: AcW0xgKC3VR1obzsTCa1QBFjxi7b1Q==
| X-WBNR-Posting-Host: 131.107.0.79
| From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
| Subject: RE: Error Designing Caluclated Member
| Date: Thu, 8 Sep 2005 15:38:18 -0700
| Lines: 42
| Message-ID: <3BB9D044-DB7F-448F-B836-CE26EF4B3A19 (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.olap
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.olap:62587
| X-Tomcat-NG: microsoft.public.sqlserver.olap
|
| I have figured out the binding issue ... is really telling me i
have a
poorly
| formed MDX expression.
|
| I am not trying this test expression as my Calculated Member:
| (Calendar.CurrentMember).[Location].[Head Count]
|
| This is returning an #err in all cells returned.
|
| My challenge is finding Cost\Person
|
| I have the following dimensions:
| Calendar with Date/Year/QTR/Month/MonthDay/WeekDay
| Location with Area/Region/District/Branch/Building/HeadCount
|
| The fact table fctCosts with the measures FixedCost,VriblCost
|
| I want to be able to add the Calculated Member Cost/person where
(FixedCost
| + VrblCost) / HeadCount = Cost\Person
|
| But I cannot get the value of
(Calendar.CurrentMember).[Location].[Head
| Count] to print.
| --
| Thanks in advance
| GH
|
|
| "GH" wrote:
|
| > I am trying this expression in the Calculated Member Builder
|
| > [Measures].[Cost]/[Building].[Head Count]
|
| > And I get the following error:
|
| > Unable to update the calculated member.
| > Formula error - cannot bind: unknown dimension or member:
"[Building].[Head
| > Count]"
|
| > This seems simple unless I cannot use a dimension member in the
calculation.
|
| > Thanks in advance
| > GH
|





Reply With Quote
  #7  
Old   
GH
 
Posts: n/a

Default RE: Error Designing Caluclated Member - 09-15-2005 , 05:31 PM



HI Peter,

Your post was helpful and I have made progress.

Currently I am using one dimension Location_HC with the following levels
Region, Country,City, Building Name.

Building Name has the Property "Head Count"

There is one measure "Cost".

I am trying to create a CalculateMeasure CostPerPerson ...

Step one is to get the headcount correctly calculated across the tree.

The following MDX expression works great and the calculations are correct at
all levels:
IIf(IsLeaf(location_hc.CurrentMember),
val(location_hc.CurrentMember.Properties("head count")),
SUM(Descendants(location_hc.CurrentMember,[building Name])))

Step two is to divide the Cost by the headcount so I tried this expression:
IIf(IsLeaf(Location_hc.CurrentMember),
(Measures.Cost)/(val(Location_hc.CurrentMember.Properties("head
count"))),(Measures.Cost)/(SUM(Descendants(location_hc.CurrentMember,[Building Name]))))

Only the leaf level calculates correctly, none of the other levels calculate
correctly.

The only difference is the division .... I don't understand!!


--
Thanks in advance
GH


"Peter Yang [MSFT]" wrote:

Quote:
Hello,

Because the headcount is only the member properties of the leaf level of
location dimension, there will be error if you use them directly in
caculated member. You may want to try the following MDX:

With
Member Measures.[headcount] As
' IIf
(
IsLeaf ( location.CurrentMember ),
val( location.CurrentMember.Properties("headcount") ),
Sum
(
Descendants( location.CurrentMember,,Leaves ),
Measures.[store sqft]
)
) '

Member Measures.[Cost Per headcount] As
' Measures.[store sales] / Measures.[headcount] '

select
{ Measures.[headcount], Measures.[Cost Per headcount] } on columns,
NON EMPTY [location].[building].members on rows
from costcube

Hope this is helpful.

Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| Thread-Topic: Error Designing Caluclated Member
| thread-index: AcW1mpfCZep34eQLR3WoxR7d3sDR2Q==
| X-WBNR-Posting-Host: 131.107.0.79
| From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
3BB9D044-DB7F-448F-B836-CE26EF4B3A19...soft (DOT) com
udRVilStFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
C8FA01CE-9763-4977-8344-5EE0197F96C2...soft (DOT) com
| Subject: RE: Error Designing Caluclated Member
| Date: Fri, 9 Sep 2005 17:00:02 -0700
| Lines: 123
| Message-ID: <AF5113B7-374B-4F2D-8391-B7B74BB6A7C7 (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.olap
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:14373
| X-Tomcat-NG: microsoft.public.sqlserver.olap
|
| HI Peter,
|
| My latest approach is to make the Headcount a Member Property of the
| BuildingName.
|
| Then when using the CalculatedMemberBuilder to create a calculated
measure
| or Member using MDX expression
| [Location_HC].CurrentMember.Properties("HeadCount") returns a #ERR in the
| grid.
| --
| Thanks in advance
| GH
|
|
| "GH" wrote:
|
| > Headcount is the number of staff permanetly assigned to that building.
|
| > So if the annual total costs of the building is $100,000 and the
Headcount
| > is 10 then the Annual CostPerPerson will be $10,000.
| > --
| > Thanks in advance
| > GH
|
|
| > "Peter Yang [MSFT]" wrote:
|
| > > Hello,
|
| > > To understand the issue better, I'd like to know the detailed meaning
of
| > > HeadCount. Is it a member property of building member? Or they are
staffs
| > > in the building?
|
| > > Best Regards,
|
| > > Peter Yang
| > > MCSE2000/2003, MCSA, MCDBA
| > > Microsoft Online Partner Support
|
| > > When responding to posts, please "Reply to Group" via your newsreader
so
| > > that others may learn and benefit from your issue.
|
| > > ================================================== ===
|
|
|
| > > This posting is provided "AS IS" with no warranties, and confers no
rights.
|
|
| > > --------------------
| > > | Thread-Topic: Error Designing Caluclated Member
| > > | thread-index: AcW0xgKC3VR1obzsTCa1QBFjxi7b1Q==
| > > | X-WBNR-Posting-Host: 131.107.0.79
| > > | From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| > > | References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
| > > | Subject: RE: Error Designing Caluclated Member
| > > | Date: Thu, 8 Sep 2005 15:38:18 -0700
| > > | Lines: 42
| > > | Message-ID: <3BB9D044-DB7F-448F-B836-CE26EF4B3A19 (AT) microsoft (DOT) com
| > > | MIME-Version: 1.0
| > > | Content-Type: text/plain;
| > > | charset="Utf-8"
| > > | Content-Transfer-Encoding: 7bit
| > > | X-Newsreader: Microsoft CDO for Windows 2000
| > > | Content-Class: urn:content-classes:message
| > > | Importance: normal
| > > | Priority: normal
| > > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > > | Newsgroups: microsoft.public.sqlserver.olap
| > > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > > | Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.sqlserver.olap:62587
| > > | X-Tomcat-NG: microsoft.public.sqlserver.olap
| > > |
| > > | I have figured out the binding issue ... is really telling me i
have a
| > > poorly
| > > | formed MDX expression.
| > > |
| > > | I am not trying this test expression as my Calculated Member:
| > > | (Calendar.CurrentMember).[Location].[Head Count]
| > > |
| > > | This is returning an #err in all cells returned.
| > > |
| > > | My challenge is finding Cost\Person
| > > |
| > > | I have the following dimensions:
| > > | Calendar with Date/Year/QTR/Month/MonthDay/WeekDay
| > > | Location with Area/Region/District/Branch/Building/HeadCount
| > > |
| > > | The fact table fctCosts with the measures FixedCost,VriblCost
| > > |
| > > | I want to be able to add the Calculated Member Cost/person where
| > > (FixedCost
| > > | + VrblCost) / HeadCount = Cost\Person
| > > |
| > > | But I cannot get the value of
(Calendar.CurrentMember).[Location].[Head
| > > | Count] to print.
| > > | --
| > > | Thanks in advance
| > > | GH
| > > |
| > > |
| > > | "GH" wrote:
| > > |
| > > | > I am trying this expression in the Calculated Member Builder
| > > |
| > > | > [Measures].[Cost]/[Building].[Head Count]
| > > |
| > > | > And I get the following error:
| > > |
| > > | > Unable to update the calculated member.
| > > | > Formula error - cannot bind: unknown dimension or member:
| > > "[Building].[Head
| > > | > Count]"
| > > |
| > > | > This seems simple unless I cannot use a dimension member in the
| > > calculation.
| > > |
| > > | > Thanks in advance
| > > | > GH
| > > |
|
|
|



Reply With Quote
  #8  
Old   
Peter Yang [MSFT]
 
Posts: n/a

Default RE: Error Designing Caluclated Member - 09-16-2005 , 01:51 AM




Hello,

I think the reason is that cost is already a measure and you does not need
to manually sum it again:

You may want to use another caculated member to do this as I mententioned:

Member Measures.[Cost Per headcount] As ' Measures.cost /
Measures.[headcount]

Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
Quote:
Thread-Topic: Error Designing Caluclated Member
thread-index: AcW6RShs4dqmPpKHRW6vCbMqqN1wcg==
X-WBNR-Posting-Host: 131.107.0.79
From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
3BB9D044-DB7F-448F-B836-CE26EF4B3A19...soft (DOT) com
<udRVilStFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl>
<C8FA01CE-9763-4977-8344-5EE0197F96C2 (AT) microsoft (DOT) com>
<AF5113B7-374B-4F2D-8391-B7B74BB6A7C7 (AT) microsoft (DOT) com>
<7h$#Hf3tFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl>
Quote:
Subject: RE: Error Designing Caluclated Member
Date: Thu, 15 Sep 2005 15:31:04 -0700
Lines: 244
Message-ID: <9B081A15-60A0-4E0C-857D-84414F88DDF4 (AT) microsoft (DOT) com
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.sqlserver.olap
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:14543
X-Tomcat-NG: microsoft.public.sqlserver.olap

HI Peter,

Your post was helpful and I have made progress.

Currently I am using one dimension Location_HC with the following levels
Region, Country,City, Building Name.

Building Name has the Property "Head Count"

There is one measure "Cost".

I am trying to create a CalculateMeasure CostPerPerson ...

Step one is to get the headcount correctly calculated across the tree.

The following MDX expression works great and the calculations are correct
at
all levels:
IIf(IsLeaf(location_hc.CurrentMember),
val(location_hc.CurrentMember.Properties("head count")),
SUM(Descendants(location_hc.CurrentMember,[building Name])))

Step two is to divide the Cost by the headcount so I tried this
expression:
IIf(IsLeaf(Location_hc.CurrentMember),
(Measures.Cost)/(val(Location_hc.CurrentMember.Properties("head

count"))),(Measures.Cost)/(SUM(Descendants(location_hc.CurrentMember,[Buildi
ng Name]))))
Quote:
Only the leaf level calculates correctly, none of the other levels
calculate
correctly.

The only difference is the division .... I don't understand!!


--
Thanks in advance
GH


"Peter Yang [MSFT]" wrote:

Hello,

Because the headcount is only the member properties of the leaf level
of
location dimension, there will be error if you use them directly in
caculated member. You may want to try the following MDX:

With
Member Measures.[headcount] As
' IIf
(
IsLeaf ( location.CurrentMember ),
val( location.CurrentMember.Properties("headcount") ),
Sum
(
Descendants( location.CurrentMember,,Leaves ),
Measures.[store sqft]
)
) '

Member Measures.[Cost Per headcount] As
' Measures.[store sales] / Measures.[headcount] '

select
{ Measures.[headcount], Measures.[Cost Per headcount] } on columns,
NON EMPTY [location].[building].members on rows
from costcube

Hope this is helpful.

Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader
so
that others may learn and benefit from your issue.

================================================== ===

This posting is provided "AS IS" with no warranties, and confers no
rights.


--------------------
| Thread-Topic: Error Designing Caluclated Member
| thread-index: AcW1mpfCZep34eQLR3WoxR7d3sDR2Q==
| X-WBNR-Posting-Host: 131.107.0.79
| From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
3BB9D044-DB7F-448F-B836-CE26EF4B3A19...soft (DOT) com
udRVilStFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
C8FA01CE-9763-4977-8344-5EE0197F96C2...soft (DOT) com
| Subject: RE: Error Designing Caluclated Member
| Date: Fri, 9 Sep 2005 17:00:02 -0700
| Lines: 123
| Message-ID: <AF5113B7-374B-4F2D-8391-B7B74BB6A7C7 (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.olap
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:14373
| X-Tomcat-NG: microsoft.public.sqlserver.olap
|
| HI Peter,
|
| My latest approach is to make the Headcount a Member Property of the
| BuildingName.
|
| Then when using the CalculatedMemberBuilder to create a calculated
measure
| or Member using MDX expression
| [Location_HC].CurrentMember.Properties("HeadCount") returns a #ERR in
the
| grid.
| --
| Thanks in advance
| GH
|
|
| "GH" wrote:
|
| > Headcount is the number of staff permanetly assigned to that
building.
|
| > So if the annual total costs of the building is $100,000 and the
Headcount
| > is 10 then the Annual CostPerPerson will be $10,000.
| > --
| > Thanks in advance
| > GH
|
|
| > "Peter Yang [MSFT]" wrote:
|
| > > Hello,
|
| > > To understand the issue better, I'd like to know the detailed
meaning
of
| > > HeadCount. Is it a member property of building member? Or they
are
staffs
| > > in the building?
|
| > > Best Regards,
|
| > > Peter Yang
| > > MCSE2000/2003, MCSA, MCDBA
| > > Microsoft Online Partner Support
|
| > > When responding to posts, please "Reply to Group" via your
newsreader
so
| > > that others may learn and benefit from your issue.
|
| > > ================================================== ===
|
|
|
| > > This posting is provided "AS IS" with no warranties, and confers
no
rights.
|
|
| > > --------------------
| > > | Thread-Topic: Error Designing Caluclated Member
| > > | thread-index: AcW0xgKC3VR1obzsTCa1QBFjxi7b1Q==
| > > | X-WBNR-Posting-Host: 131.107.0.79
| > > | From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| > > | References:
9E1D8EA7-A670-4794-AD79-8141A5D4B19E...soft (DOT) com
| > > | Subject: RE: Error Designing Caluclated Member
| > > | Date: Thu, 8 Sep 2005 15:38:18 -0700
| > > | Lines: 42
| > > | Message-ID: <3BB9D044-DB7F-448F-B836-CE26EF4B3A19 (AT) microsoft (DOT) com
| > > | MIME-Version: 1.0
| > > | Content-Type: text/plain;
| > > | charset="Utf-8"
| > > | Content-Transfer-Encoding: 7bit
| > > | X-Newsreader: Microsoft CDO for Windows 2000
| > > | Content-Class: urn:content-classes:message
| > > | Importance: normal
| > > | Priority: normal
| > > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > > | Newsgroups: microsoft.public.sqlserver.olap
| > > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > > | Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.sqlserver.olap:62587
| > > | X-Tomcat-NG: microsoft.public.sqlserver.olap
| > > |
| > > | I have figured out the binding issue ... is really telling me i
have a
| > > poorly
| > > | formed MDX expression.
| > > |
| > > | I am not trying this test expression as my Calculated Member:
| > > | (Calendar.CurrentMember).[Location].[Head Count]
| > > |
| > > | This is returning an #err in all cells returned.
| > > |
| > > | My challenge is finding Cost\Person
| > > |
| > > | I have the following dimensions:
| > > | Calendar with Date/Year/QTR/Month/MonthDay/WeekDay
| > > | Location with Area/Region/District/Branch/Building/HeadCount
| > > |
| > > | The fact table fctCosts with the measures FixedCost,VriblCost
| > > |
| > > | I want to be able to add the Calculated Member Cost/person
where
| > > (FixedCost
| > > | + VrblCost) / HeadCount = Cost\Person
| > > |
| > > | But I cannot get the value of
(Calendar.CurrentMember).[Location].[Head
| > > | Count] to print.
| > > | --
| > > | Thanks in advance
| > > | GH
| > > |
| > > |
| > > | "GH" wrote:
| > > |
| > > | > I am trying this expression in the Calculated Member Builder
| > > |
| > > | > [Measures].[Cost]/[Building].[Head Count]
| > > |
| > > | > And I get the following error:
| > > |
| > > | > Unable to update the calculated member.
| > > | > Formula error - cannot bind: unknown dimension or member:
| > > "[Building].[Head
| > > | > Count]"
| > > |
| > > | > This seems simple unless I cannot use a dimension member in
the
| > > calculation.
| > > |
| > > | > Thanks in advance
| > > | > GH
| > > |
|
|
|





Reply With Quote
  #9  
Old   
GH
 
Posts: n/a

Default RE: Error Designing Caluclated Member - 09-16-2005 , 10:14 AM



Thanks Peter,

That point went over my head.

I have it working now ...

Now I am going to add in additional dimensions ... hopefully without issue.

Thanks for your patience.

--
Thanks in advance
GH


"Peter Yang [MSFT]" wrote:

Quote:
Hello,

I think the reason is that cost is already a measure and you does not need
to manually sum it again:

You may want to use another caculated member to do this as I mententioned:

Member Measures.[Cost Per headcount] As ' Measures.cost /
Measures.[headcount]

Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Thread-Topic: Error Designing Caluclated Member
| thread-index: AcW6RShs4dqmPpKHRW6vCbMqqN1wcg==
| X-WBNR-Posting-Host: 131.107.0.79
| From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
3BB9D044-DB7F-448F-B836-CE26EF4B3A19...soft (DOT) com
udRVilStFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
C8FA01CE-9763-4977-8344-5EE0197F96C2...soft (DOT) com
AF5113B7-374B-4F2D-8391-B7B74BB6A7C7...soft (DOT) com
7h$#Hf3tFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| Subject: RE: Error Designing Caluclated Member
| Date: Thu, 15 Sep 2005 15:31:04 -0700
| Lines: 244
| Message-ID: <9B081A15-60A0-4E0C-857D-84414F88DDF4 (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.olap
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:14543
| X-Tomcat-NG: microsoft.public.sqlserver.olap
|
| HI Peter,
|
| Your post was helpful and I have made progress.
|
| Currently I am using one dimension Location_HC with the following levels
| Region, Country,City, Building Name.
|
| Building Name has the Property "Head Count"
|
| There is one measure "Cost".
|
| I am trying to create a CalculateMeasure CostPerPerson ...
|
| Step one is to get the headcount correctly calculated across the tree.
|
| The following MDX expression works great and the calculations are correct
at
| all levels:
| IIf(IsLeaf(location_hc.CurrentMember),
| val(location_hc.CurrentMember.Properties("head count")),
| SUM(Descendants(location_hc.CurrentMember,[building Name])))
|
| Step two is to divide the Cost by the headcount so I tried this
expression:
| IIf(IsLeaf(Location_hc.CurrentMember),
| (Measures.Cost)/(val(Location_hc.CurrentMember.Properties("head
|
count"))),(Measures.Cost)/(SUM(Descendants(location_hc.CurrentMember,[Buildi
ng Name]))))
|
| Only the leaf level calculates correctly, none of the other levels
calculate
| correctly.
|
| The only difference is the division .... I don't understand!!
|
|
| --
| Thanks in advance
| GH
|
|
| "Peter Yang [MSFT]" wrote:
|
| > Hello,
|
| > Because the headcount is only the member properties of the leaf level
of
| > location dimension, there will be error if you use them directly in
| > caculated member. You may want to try the following MDX:
|
| > With
| > Member Measures.[headcount] As
| > ' IIf
| > (
| > IsLeaf ( location.CurrentMember ),
| > val( location.CurrentMember.Properties("headcount") ),
| > Sum
| > (
| > Descendants( location.CurrentMember,,Leaves ),
| > Measures.[store sqft]
| > )
| > ) '
|
| > Member Measures.[Cost Per headcount] As
| > ' Measures.[store sales] / Measures.[headcount] '
|
| > select
| > { Measures.[headcount], Measures.[Cost Per headcount] } on columns,
| > NON EMPTY [location].[building].members on rows
| > from costcube
|
| > Hope this is helpful.
|
| > Regards,
|
| > Peter Yang
| > MCSE2000/2003, MCSA, MCDBA
| > Microsoft Online Partner Support
|
| > When responding to posts, please "Reply to Group" via your newsreader
so
| > that others may learn and benefit from your issue.
|
| > ================================================== ===
|
| > This posting is provided "AS IS" with no warranties, and confers no
rights.
|
|
| > --------------------
| > | Thread-Topic: Error Designing Caluclated Member
| > | thread-index: AcW1mpfCZep34eQLR3WoxR7d3sDR2Q==
| > | X-WBNR-Posting-Host: 131.107.0.79
| > | From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| > | References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
| > <3BB9D044-DB7F-448F-B836-CE26EF4B3A19 (AT) microsoft (DOT) com
| > <udRVilStFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > <C8FA01CE-9763-4977-8344-5EE0197F96C2 (AT) microsoft (DOT) com
| > | Subject: RE: Error Designing Caluclated Member
| > | Date: Fri, 9 Sep 2005 17:00:02 -0700
| > | Lines: 123
| > | Message-ID: <AF5113B7-374B-4F2D-8391-B7B74BB6A7C7 (AT) microsoft (DOT) com
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.sqlserver.olap
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:14373
| > | X-Tomcat-NG: microsoft.public.sqlserver.olap
| > |
| > | HI Peter,
| > |
| > | My latest approach is to make the Headcount a Member Property of the
| > | BuildingName.
| > |
| > | Then when using the CalculatedMemberBuilder to create a calculated
| > measure
| > | or Member using MDX expression
| > | [Location_HC].CurrentMember.Properties("HeadCount") returns a #ERR in
the
| > | grid.
| > | --
| > | Thanks in advance
| > | GH
| > |
| > |
| > | "GH" wrote:
| > |
| > | > Headcount is the number of staff permanetly assigned to that
building.
| > |
| > | > So if the annual total costs of the building is $100,000 and the
| > Headcount
| > | > is 10 then the Annual CostPerPerson will be $10,000.
| > | > --
| > | > Thanks in advance
| > | > GH
| > |
| > |
| > | > "Peter Yang [MSFT]" wrote:
| > |
| > | > > Hello,
| > |
| > | > > To understand the issue better, I'd like to know the detailed
meaning
| > of
| > | > > HeadCount. Is it a member property of building member? Or they
are
| > staffs
| > | > > in the building?
| > |
| > | > > Best Regards,
| > |
| > | > > Peter Yang
| > | > > MCSE2000/2003, MCSA, MCDBA
| > | > > Microsoft Online Partner Support
| > |
| > | > > When responding to posts, please "Reply to Group" via your
newsreader
| > so
| > | > > that others may learn and benefit from your issue.
| > |
| > | > > ================================================== ===
| > |
| > |
| > |
| > | > > This posting is provided "AS IS" with no warranties, and confers
no
| > rights.
| > |
| > |
| > | > > --------------------
| > | > > | Thread-Topic: Error Designing Caluclated Member
| > | > > | thread-index: AcW0xgKC3VR1obzsTCa1QBFjxi7b1Q==
| > | > > | X-WBNR-Posting-Host: 131.107.0.79
| > | > > | From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| > | > > | References:
9E1D8EA7-A670-4794-AD79-8141A5D4B19E...soft (DOT) com
| > | > > | Subject: RE: Error Designing Caluclated Member
| > | > > | Date: Thu, 8 Sep 2005 15:38:18 -0700
| > | > > | Lines: 42
| > | > > | Message-ID: <3BB9D044-DB7F-448F-B836-CE26EF4B3A19 (AT) microsoft (DOT) com
| > | > > | MIME-Version: 1.0
| > | > > | Content-Type: text/plain;
| > | > > | charset="Utf-8"
| > | > > | Content-Transfer-Encoding: 7bit
| > | > > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > > | Content-Class: urn:content-classes:message
| > | > > | Importance: normal
| > | > > | Priority: normal
| > | > > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > > | Newsgroups: microsoft.public.sqlserver.olap
| > | > > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | > > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > > | Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.sqlserver.olap:62587
| > | > > | X-Tomcat-NG: microsoft.public.sqlserver.olap
| > | > > |
| > | > > | I have figured out the binding issue ... is really telling me i
| > have a
| > | > > poorly
| > | > > | formed MDX expression.
| > | > > |
| > | > > | I am not trying this test expression as my Calculated Member:
| > | > > | (Calendar.CurrentMember).[Location].[Head Count]
| > | > > |
| > | > > | This is returning an #err in all cells returned.
| > | > > |
| > | > > | My challenge is finding Cost\Person
| > | > > |
| > | > > | I have the following dimensions:
| > | > > | Calendar with Date/Year/QTR/Month/MonthDay/WeekDay
| > | > > | Location with Area/Region/District/Branch/Building/HeadCount
| > | > > |
| > | > > | The fact table fctCosts with the measures FixedCost,VriblCost
| > | > > |
| > | > > | I want to be able to add the Calculated Member Cost/person
where
| > | > > (FixedCost
| > | > > | + VrblCost) / HeadCount = Cost\Person
| > | > > |
| > | > > | But I cannot get the value of
| > (Calendar.CurrentMember).[Location].[Head
| > | > > | Count] to print.
| > | > > | --
| > | > > | Thanks in advance
| > | > > | GH
| > | > > |
| > | > > |
| > | > > | "GH" wrote:
| > | > > |
| > | > > | > I am trying this expression in the Calculated Member Builder
| > | > > |
| > | > > | > [Measures].[Cost]/[Building].[Head Count]
| > | > > |
| > | > > | > And I get the following error:
| > | > > |
| > | > > | > Unable to update the calculated member.

Reply With Quote
  #10  
Old   
GH
 
Posts: n/a

Default RE: Error Designing Caluclated Member - 09-20-2005 , 05:37 PM



HI Peter,

I am back on this issue ...I have added the dimension Calendar
(Year,Qtr,Month) to the cube ... now I have the Location ( Area, Region,
District, Branch, Building (and the building property Headcount)).

Now all levels are calculating the total sum of the headcount .... I cannot
find any documentation with a calander dim being used.

Any suggestions would be appreciated.
--
Thanks in advance
GH


"GH" wrote:

Quote:
Thanks Peter,

That point went over my head.

I have it working now ...

Now I am going to add in additional dimensions ... hopefully without issue.

Thanks for your patience.

--
Thanks in advance
GH


"Peter Yang [MSFT]" wrote:


Hello,

I think the reason is that cost is already a measure and you does not need
to manually sum it again:

You may want to use another caculated member to do this as I mententioned:

Member Measures.[Cost Per headcount] As ' Measures.cost /
Measures.[headcount]

Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

================================================== ===


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Thread-Topic: Error Designing Caluclated Member
| thread-index: AcW6RShs4dqmPpKHRW6vCbMqqN1wcg==
| X-WBNR-Posting-Host: 131.107.0.79
| From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
3BB9D044-DB7F-448F-B836-CE26EF4B3A19...soft (DOT) com
udRVilStFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
C8FA01CE-9763-4977-8344-5EE0197F96C2...soft (DOT) com
AF5113B7-374B-4F2D-8391-B7B74BB6A7C7...soft (DOT) com
7h$#Hf3tFHA.768 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| Subject: RE: Error Designing Caluclated Member
| Date: Thu, 15 Sep 2005 15:31:04 -0700
| Lines: 244
| Message-ID: <9B081A15-60A0-4E0C-857D-84414F88DDF4 (AT) microsoft (DOT) com
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.olap
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:14543
| X-Tomcat-NG: microsoft.public.sqlserver.olap
|
| HI Peter,
|
| Your post was helpful and I have made progress.
|
| Currently I am using one dimension Location_HC with the following levels
| Region, Country,City, Building Name.
|
| Building Name has the Property "Head Count"
|
| There is one measure "Cost".
|
| I am trying to create a CalculateMeasure CostPerPerson ...
|
| Step one is to get the headcount correctly calculated across the tree.
|
| The following MDX expression works great and the calculations are correct
at
| all levels:
| IIf(IsLeaf(location_hc.CurrentMember),
| val(location_hc.CurrentMember.Properties("head count")),
| SUM(Descendants(location_hc.CurrentMember,[building Name])))
|
| Step two is to divide the Cost by the headcount so I tried this
expression:
| IIf(IsLeaf(Location_hc.CurrentMember),
| (Measures.Cost)/(val(Location_hc.CurrentMember.Properties("head
|
count"))),(Measures.Cost)/(SUM(Descendants(location_hc.CurrentMember,[Buildi
ng Name]))))
|
| Only the leaf level calculates correctly, none of the other levels
calculate
| correctly.
|
| The only difference is the division .... I don't understand!!
|
|
| --
| Thanks in advance
| GH
|
|
| "Peter Yang [MSFT]" wrote:
|
| > Hello,
|
| > Because the headcount is only the member properties of the leaf level
of
| > location dimension, there will be error if you use them directly in
| > caculated member. You may want to try the following MDX:
|
| > With
| > Member Measures.[headcount] As
| > ' IIf
| > (
| > IsLeaf ( location.CurrentMember ),
| > val( location.CurrentMember.Properties("headcount") ),
| > Sum
| > (
| > Descendants( location.CurrentMember,,Leaves ),
| > Measures.[store sqft]
| > )
| > ) '
|
| > Member Measures.[Cost Per headcount] As
| > ' Measures.[store sales] / Measures.[headcount] '
|
| > select
| > { Measures.[headcount], Measures.[Cost Per headcount] } on columns,
| > NON EMPTY [location].[building].members on rows
| > from costcube
|
| > Hope this is helpful.
|
| > Regards,
|
| > Peter Yang
| > MCSE2000/2003, MCSA, MCDBA
| > Microsoft Online Partner Support
|
| > When responding to posts, please "Reply to Group" via your newsreader
so
| > that others may learn and benefit from your issue.
|
| > ================================================== ===
|
| > This posting is provided "AS IS" with no warranties, and confers no
rights.
|
|
| > --------------------
| > | Thread-Topic: Error Designing Caluclated Member
| > | thread-index: AcW1mpfCZep34eQLR3WoxR7d3sDR2Q==
| > | X-WBNR-Posting-Host: 131.107.0.79
| > | From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| > | References: <9E1D8EA7-A670-4794-AD79-8141A5D4B19E (AT) microsoft (DOT) com
| > <3BB9D044-DB7F-448F-B836-CE26EF4B3A19 (AT) microsoft (DOT) com
| > <udRVilStFHA.780 (AT) TK2MSFTNGXA01 (DOT) phx.gbl
| > <C8FA01CE-9763-4977-8344-5EE0197F96C2 (AT) microsoft (DOT) com
| > | Subject: RE: Error Designing Caluclated Member
| > | Date: Fri, 9 Sep 2005 17:00:02 -0700
| > | Lines: 123
| > | Message-ID: <AF5113B7-374B-4F2D-8391-B7B74BB6A7C7 (AT) microsoft (DOT) com
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.sqlserver.olap
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.olap:14373
| > | X-Tomcat-NG: microsoft.public.sqlserver.olap
| > |
| > | HI Peter,
| > |
| > | My latest approach is to make the Headcount a Member Property of the
| > | BuildingName.
| > |
| > | Then when using the CalculatedMemberBuilder to create a calculated
| > measure
| > | or Member using MDX expression
| > | [Location_HC].CurrentMember.Properties("HeadCount") returns a #ERR in
the
| > | grid.
| > | --
| > | Thanks in advance
| > | GH
| > |
| > |
| > | "GH" wrote:
| > |
| > | > Headcount is the number of staff permanetly assigned to that
building.
| > |
| > | > So if the annual total costs of the building is $100,000 and the
| > Headcount
| > | > is 10 then the Annual CostPerPerson will be $10,000.
| > | > --
| > | > Thanks in advance
| > | > GH
| > |
| > |
| > | > "Peter Yang [MSFT]" wrote:
| > |
| > | > > Hello,
| > |
| > | > > To understand the issue better, I'd like to know the detailed
meaning
| > of
| > | > > HeadCount. Is it a member property of building member? Or they
are
| > staffs
| > | > > in the building?
| > |
| > | > > Best Regards,
| > |
| > | > > Peter Yang
| > | > > MCSE2000/2003, MCSA, MCDBA
| > | > > Microsoft Online Partner Support
| > |
| > | > > When responding to posts, please "Reply to Group" via your
newsreader
| > so
| > | > > that others may learn and benefit from your issue.
| > |
| > | > > ================================================== ===
| > |
| > |
| > |
| > | > > This posting is provided "AS IS" with no warranties, and confers
no
| > rights.
| > |
| > |
| > | > > --------------------
| > | > > | Thread-Topic: Error Designing Caluclated Member
| > | > > | thread-index: AcW0xgKC3VR1obzsTCa1QBFjxi7b1Q==
| > | > > | X-WBNR-Posting-Host: 131.107.0.79
| > | > > | From: "=?Utf-8?B?R0g=?=" <vakar (AT) community (DOT) nospam
| > | > > | References:
9E1D8EA7-A670-4794-AD79-8141A5D4B19E...soft (DOT) com
| > | > > | Subject: RE: Error Designing Caluclated Member
| > | > > | Date: Thu, 8 Sep 2005 15:38:18 -0700
| > | > > | Lines: 42
| > | > > | Message-ID: <3BB9D044-DB7F-448F-B836-CE26EF4B3A19 (AT) microsoft (DOT) com
| > | > > | MIME-Version: 1.0
| > | > > | Content-Type: text/plain;
| > | > > | charset="Utf-8"
| > | > > | Content-Transfer-Encoding: 7bit
| > | > > | X-Newsreader: Microsoft CDO for Windows 2000
| > | > > | Content-Class: urn:content-classes:message
| > | > > | Importance: normal
| > | > > | Priority: normal
| > | > > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | > > | Newsgroups: microsoft.public.sqlserver.olap
| > | > > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | > > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | > > | Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.sqlserver.olap:62587
| > | > > | X-Tomcat-NG: microsoft.public.sqlserver.olap
| > | > > |
| > | > > | I have figured out the binding issue ... is really telling me i
| > have a
| > | > > poorly
| > | > > | formed MDX expression.
| > | > > |
| > | > > | I am not trying this test expression as my Calculated Member:
| > | > > | (Calendar.CurrentMember).[Location].[Head Count]
| > | > > |
| > | > > | This is returning an #err in all cells returned.
| > | > > |
| > | > > | My challenge is finding Cost\Person
| > | > > |
| > | > > | I have the following dimensions:
| > | > > | Calendar with Date/Year/QTR/Month/MonthDay/WeekDay
| > | > > | Location with Area/Region/District/Branch/Building/HeadCount
| > | > > |
| > | > > | The fact table fctCosts with the measures FixedCost,VriblCost
| > | > > |
| > | > > | I want to be able to add the Calculated Member Cost/person
where
| > | > > (FixedCost
| > | > > | + VrblCost) / HeadCount = Cost\Person

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.