Sounds like your problem is similar to this recent thread -
if so, you will be able to do a distinct visitor count using this
technique IF you have a [Visitor] dimension whose leaf level is down to
the individual visitor. In that case, you can use NonEmptyCrossJoin to
find out how many non-empty visitor instances exist over the 3 months.
But the performance may not be great till you tune the query.
From: Sean Boon [MS]
Date Posted: 7/15/2003 11:36:00 AM
Audrey,
Distinct count cannot be rolled up on the fly using AGGREGATE() or SUM()
functions. What you can do is employ the method described in a
whitepaper
on MSDN.
http://msdn.microsoft.com/library/de.../en-us/dnolap/
html/distinct2.asp
Sean
--
Sean Boon
SQL Server BI Product Unit
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
"Audrey Ng" <odd26uk (AT) yahoo (DOT) co.uk> wrote
Quote:
So, how would I then go about rolling up this distinct count measure?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it! |
Audrey,
I think that you can avoid invoking NECJ twice by using:
[Cases].[Individual].Members instead of: [Cases].Members
This assumes that [Cases].[Individual] is your leaf level.
You could then simplify by avoiding the iif condition:
Quote:
|
NonEmptyCrossJoin({[Cases].[Individual].Members},
|
{[Locations].CurrentMember},
{[MR Measures].CurrentMember},
{[Programs].CurrentMember},
{[Staging].CurrentMember},
{[Time Calendar].CurrentMember},
LastPeriods(12,[Time Fiscal].CurrentMember),1).Count
See if this improves your response time significantly. If you can make
the intermediate level of [Cases] visible, then there is a possibility
to try another MDX approach.
- Deepak
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!