dbTalk Databases Forums  

"New" Distinct Customer Count

comp.databases.olap comp.databases.olap


Discuss "New" Distinct Customer Count in the comp.databases.olap forum.



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

Default "New" Distinct Customer Count - 04-09-2006 , 11:17 PM






Greetings,

We have cube with a Dimension (three levels) :

Level 1 - Branch

level 2 - Products

Level 3 - Accounts

All the Accounts have Member Properties associated with them such as
"Account Opening Date".
The Cube has measures such as Outstanding Principal Amount /
Outstanding
Interest Amount / Loan Disbursed Amount.

We use the Member properties (Account Opening Date) to Filter the
Account
based on the User Inputs and we display the data grouped on Product (
the
Data is grouped at SRS 2k)

We also need to display the Count of Total Customers & New Customers
added
within the Date Range (which is user specified) product wise.

Here is the Query we have written to get the Total Customer Count Till
Date :-

WITH


MEMBER
[MEASURES].[CalcCount] AS
'COUNT(CROSSJOIN({[MEASURES].[RelativeCalcCount]},
DESCENDANTS([Customers].CURRENTMEMBER,
[Customers].[Customer ID])), EXCLUDEEMPTY)'

MEMBER
[MEASURES].[RelativeCalcCount] as ' CoalesceEmpty(
([MEASURES].[Customers Count], [Transaction Dates].CurrentMember),
([MEASURES].[RelativeCalcCount], [Transaction
Dates].currentmember.prevmember))'


SELECT
{ [MEASURES].[CalcCount]} ON 0,
-- [Customers].CHILDREN ON 1,
[ProductsAccounts].[Product IDBR].Members on 1

FROM LoansAndSavings
WHere
([Transaction Dates].[All Transaction Dates].[2004].[Quarter
4].[October].[1])

Now our problem is getting the Count of New Customers , how do we
introduce
the From Date to get the New Customers.

Thanks,
Charu Gupta


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.