dbTalk Databases Forums  

Number of members depends on date

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


Discuss Number of members depends on date in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
smalevanny@hotmail.com
 
Posts: n/a

Default Number of members depends on date - 02-15-2006 , 02:26 AM






Hi,

I'm faced with a task of building a cube, which has 2 dimentions
(actually more, but
I am slicing off not relevant parts).

1) Time
2) Customer

The fact table is billing table (cdr_all), the customer table is
customer_billing table.
When browsing cube I'd like to show as members of customer dimension
only customers
that were billed on a certain date. Another words the number of
customers in dimension
should depend on a day choosen. Is it possible to do this?

The SQL that dynamically defines the number of customers is:

select c.name from cdr_all a, customer_billing c
where a.id = c.id and
convert(varchar(10), a.call_date, 101) = '10/02/2005' /* custom date
*/

TNX, Stan


Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Number of members depends on date - 02-15-2006 , 10:18 PM






Hi Stan,

This isn't the typical approach taken in such cases - from the SQL
query, it seems that you need to identify customers who made calls on a
particular date. That can certainly be done, by querying for customers
with fact data on any date (assuming that the Time dimension drills down
to dates).


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***

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.