![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
We would like to answer these types of questions with our SSAS 2005 cube: How many customers purchased a specific product? How many customers purchase mostly by credit card? How many customers purchase products costing over $100? How many customers were first time customers this year? We have a customer dimension and are trying to avoid creating a customer fact table with a loaded customer count measure and conformed dimensions. We would like to instead implement a distinct calculated measure based on the customer number attribute in the customer dimension. My understanding is SSAS only allows one distinct count calculated measure per measure group. My question is how to implement this in SSAS 2005? Currently I have one calculated measure with the following code: DISTINCTCOUNT( [Customer].[Customer Number].Members) This just gets added to the end of the measure groups in the browser window and is not included within each measure group. How should I proceed from here? |
#3
| |||
| |||
|
|
try something like this as a starting point: for a "simple" distinct count count(exists([Customer].[Customer Number].[Customer Number].Members,, "Sales Measure group")) and this: count(exists([Customer].[Customer Number].[Customer Number].Members,<Filter Here>, "Sales Measure group")) take care: [Customer].[Customer Number].[Customer Number].Members return only the customers [Customer].[Customer Number].Members will return the "All Customers" member + the customers (so 1 more then expected) look at this for usages: http://sqljunkies.com/HowTo/9D6C4A2A...9A46E6640.scuk http://msdn.microsoft.com/library/de.../distinct2.asp you can found some resources on the net about distinct count and basket analysis formulas. SSAS allow more then 1 calculated distinct count by measure group (you can create any number of calculated members, the measuregroup associated to a calculation is more for display purpose then for real constraint) but only 1 "physical" measure with DCount aggregation by measure group. good luck. "bhorwatt" <bhorwatt (AT) discussions (DOT) microsoft.com> wrote in message news:60AFB546-3BEA-42A0-A5B3-3B800C491B01 (AT) microsoft (DOT) com... We would like to answer these types of questions with our SSAS 2005 cube: How many customers purchased a specific product? How many customers purchase mostly by credit card? How many customers purchase products costing over $100? How many customers were first time customers this year? We have a customer dimension and are trying to avoid creating a customer fact table with a loaded customer count measure and conformed dimensions. We would like to instead implement a distinct calculated measure based on the customer number attribute in the customer dimension. My understanding is SSAS only allows one distinct count calculated measure per measure group. My question is how to implement this in SSAS 2005? Currently I have one calculated measure with the following code: DISTINCTCOUNT( [Customer].[Customer Number].Members) This just gets added to the end of the measure groups in the browser window and is not included within each measure group. How should I proceed from here? |
![]() |
| Thread Tools | |
| Display Modes | |
| |