dbTalk Databases Forums  

Calculated Member using member properties at leaf level only

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


Discuss Calculated Member using member properties at leaf level only in the microsoft.public.sqlserver.olap forum.



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

Default Calculated Member using member properties at leaf level only - 10-21-2004 , 12:41 AM






This is an urgent problem, so any help would be greatly appreciated.

I have a ragged dimension that has a property Type against the lowest
2 Levels (level 5 & 6), e.g.

1-All Customers
2--NSW
3---Metro
4-----Sydney
5------CustomerA (Type = "B")
6-------CustomerAA (Type = "B")
6-------CustomerAB (Type = "B")
5------CustomerBB (Type = "A")
5------CustomerCC (Type = "B")
3---Rural

I have another dimension that contains the Types, e.g.
(A Level 3 selection will always be selected for Types.)

1-All Types
2--Group A
3---Type A
3---Type B

How do I create a calculated member that returns the number of
customers of certain Type that exists at the leaf level only. For
example, for Customer A = 2, for Customer AA = 1, for Sydney = 4, etc.

I get stuck on having to specify the level when using Descendants,
e.g.
Count(Filter(Descendants([Customers].CurrentMember,[Customers].[Level
5]),[Customers].Properties("Type") = [Type].CurrentMember.Name))
which means for CustomerA the 1 is returned instead of 2 if Type B is
selected.

Thanks again for the help.

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

Default Re: Calculated Member using member properties at leaf level only - 10-21-2004 , 07:44 PM






Thanks, I think I've solved it.

Count(Filter(Descendants([Customers].CurrentMember,[Customers].[Level6],
LEAVES),[Customers].Properties("Type") = [Type].CurrentMember.Name))



zelda.calitz (AT) bmw (DOT) com.au (zee) wrote in message news:<c726d6d2.0410202141.6d37a1f1 (AT) posting (DOT) google.com>...
Quote:
This is an urgent problem, so any help would be greatly appreciated.

I have a ragged dimension that has a property Type against the lowest
2 Levels (level 5 & 6), e.g.

1-All Customers
2--NSW
3---Metro
4-----Sydney
5------CustomerA (Type = "B")
6-------CustomerAA (Type = "B")
6-------CustomerAB (Type = "B")
5------CustomerBB (Type = "A")
5------CustomerCC (Type = "B")
3---Rural

I have another dimension that contains the Types, e.g.
(A Level 3 selection will always be selected for Types.)

1-All Types
2--Group A
3---Type A
3---Type B

How do I create a calculated member that returns the number of
customers of certain Type that exists at the leaf level only. For
example, for Customer A = 2, for Customer AA = 1, for Sydney = 4, etc.

I get stuck on having to specify the level when using Descendants,
e.g.
Count(Filter(Descendants([Customers].CurrentMember,[Customers].[Level
5]),[Customers].Properties("Type") = [Type].CurrentMember.Name))
which means for CustomerA the 1 is returned instead of 2 if Type B is
selected.

Thanks again for the help.

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.