Distinct Count based on another measure -
10-03-2005
, 05:29 AM
Hi
I'm trying to perform a distinct count on the number of customers, but
only where the customers have a sales value <> 0. (e.g. if a customer
places and then cancels an order they would have a value <> 0 at a
specific point in time, but now it's zero)
The code below gives me the distinct count, but what's the syntax to
only pick up the customers where [Measures].[Sales] <> 0
WITH MEMBER
[MEASURES].[CalcCount]
AS
'COUNT(CROSSJOIN({[Measures].[Sales]}, DESCENDANTS
([Customer].CURRENTMEMBER, [Customer].[Customer Ref No])))'
SELECT
{[Measures].[Sales], [MEASURES].[CalcCount] }
ON COLUMNS,
[Customer].CHILDREN ON ROWS
FROM
[Sales] |