dbTalk Databases Forums  

Count members of a level

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


Discuss Count members of a level in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
s.greci@gmail.com
 
Posts: n/a

Default Count members of a level - 11-08-2005 , 03:48 AM






Hi all,
I'm a OLAP beginner and i'm building my first cube for my customer.
I have a hierarchical geographic dimension that reproduce a tipical
structure like this one:

Main Area - Sub Area - Seller - Customer

I need to count the number of Customers, how can i accomplish my duty?
Using a calculated member in the dimension? Some other ways?

Thanks in advance.

Simone Greci


Reply With Quote
  #2  
Old   
Dean Adam
 
Posts: n/a

Default RE: Count members of a level - 11-09-2005 , 10:34 AM






It depends what you want. If you just want a count of all customers in the
dimension, then try a calculated measure like this: -

[customer dim].[customer level].COUNT

If you want only the customers below the current member in the customer
hierarchy (e.g. within a particular sub-area), then try this: -

COUNT(DESCENDANTS([customer dim].CURRENTMEMBER,[customer dim].[customer
level]))

If you want the customer count to be limited by selections in other
dimensions, e.g. if the time dimension is fixed on JULY then only count the
customers we sold to in July, then I think the best way would be to create a
DISTINCT COUNT measure based on the customer ID in the fact table.

--
Dean Adam
Magenic Technologies


"s.greci (AT) gmail (DOT) com" wrote:

Quote:
Hi all,
I'm a OLAP beginner and i'm building my first cube for my customer.
I have a hierarchical geographic dimension that reproduce a tipical
structure like this one:

Main Area - Sub Area - Seller - Customer

I need to count the number of Customers, how can i accomplish my duty?
Using a calculated member in the dimension? Some other ways?

Thanks in advance.

Simone Greci



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.