dbTalk Databases Forums  

Using Aggregate function on Distinct count Measures and Calculated Members

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Using Aggregate function on Distinct count Measures and Calculated Members in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
olapforsri
 
Posts: n/a

Default Using Aggregate function on Distinct count Measures and Calculated Members - 04-18-2004 , 06:41 AM






Hi


When I use Aggregate function on a Distinct Count Measure "Members" and a
a Calculated Measure "Patient Percent of Members

Analysis services displays Error Message for both Distinct Count and Calculated Measur
I am struck

The following is the MDX Query

WITH Member [Episode].[NewMember] A
'aggregate
Filter
{[Episode].[Episode Key].Members},Val([Episode].CurrentMember.Properties("Episode Payment"))>5

)
SELECT {[Calendar Time].[Calendar Year].Members} ON ROWS
{[Measures].[Members],[Measures].[Patient Percent of Members]} ON COLUMN
FROM VCPerCal
WHERE [Episode].[NewMember

I am trying to filter "Calendar Time" members based on a members of "Episodes" dimension

regards.

Reply With Quote
  #2  
Old   
Sean Boon [MS]
 
Posts: n/a

Default Re: Using Aggregate function on Distinct count Measures and Calculated Members - 04-19-2004 , 12:19 PM






You cannot use the Aggregate() function with distinct count aggregate types.
This is being addressed in the next release of Analysis Services. In the
meantime, there is a workaround that you can use. I'll post it over in the
http://groups.msn.com/OLAPServicesDevelopersForum


--
Sean

--
Sean Boon
SQL Server BI Product Unit

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"olapforsri" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,


When I use Aggregate function on a Distinct Count Measure "Members" and
a
a Calculated Measure "Patient Percent of Members"

Analysis services displays Error Message for both Distinct Count and
Calculated Measure
I am struck.

The following is the MDX Query.

WITH Member [Episode].[NewMember] AS
'aggregate(
Filter(
{[Episode].[Episode
Key].Members},Val([Episode].CurrentMember.Properties("Episode Payment"))>54
)
)'
SELECT {[Calendar Time].[Calendar Year].Members} ON ROWS,
{[Measures].[Members],[Measures].[Patient Percent of Members]} ON
COLUMNS
FROM VCPerCalc
WHERE [Episode].[NewMember]

I am trying to filter "Calendar Time" members based on a members of
"Episodes" dimension.

regards.



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.