Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Analysis Services (2000)
 Using count() and crossjoin() to return distinct c

Author  Topic 

ariesnw
Starting Member

1 Post

Posted - 2005-05-12 : 21:28:07
In my AS cube, I've created a calculated measure using the following MDX:
Count(Crossjoin({[Measures].[Number of hits]},
Descendants([Area].Currentmember, [Area].[User Name])),
Excludeempty)
As expected, the measure provides the number of unique users for each area visited (based on logs from a web site). The problem I'm having is that the total number of unique users for ALL areas visited appears to be the sum of the
unique users from each area, rather than simply being the total number of unique users. Anyone have any suggestions on how to get the cube to calculate correctly at the ALL level?

mateamargo
Starting Member

10 Posts

Posted - 2005-06-10 : 11:22:31
I think you can use Calcutated Cells, in the wizard, you can specified that the "All" member has a special value.
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-06-10 : 12:41:03
Does this give the same result ?

Sum(Descendants([Area].Currentmember, [Area].[User Name]), Iif([Measures].[Number of hits]>0, 1, 0))

Can a [User Name] be in many areas ?

rockmoose
Go to Top of Page
   

- Advertisement -