dbTalk Databases Forums  

Aggregate() Function and DISTINCT COUNT

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


Discuss Aggregate() Function and DISTINCT COUNT in the microsoft.public.sqlserver.olap forum.



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

Default Aggregate() Function and DISTINCT COUNT - 12-09-2004 , 08:21 AM






Hello,

I have one problem in writing an MDX Query. When I use the Aggregate
function with a DISTINCT COUNT Measure, get the following error.
--------------------------------------
Unable to open cellset

Formula error - aggregations are not supported for the DISTINCT COUNT
measure "Invoice Number" - in the Aggregate function
-------------------------
My Query is given below:
With
Member [Geography].[Filter] As 'Aggregate({[Geography].[USA],
[Geography].[India]})'
Select
{[Measures].[Invoice No]} On Columns,
{[Customer].[Customer Name].Members} On Rows
From
Sales
Where ([Geography].[Filter])

Please help in resolving this problem.

Thanks in advance.

Manoj

Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: Aggregate() Function and DISTINCT COUNT - 12-09-2004 , 09:01 AM






the aggregate function cannot be used against a Distinct count measure
(standard measure)
you have to create a calculated distinct count to do this.


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

Quote:
Hello,

I have one problem in writing an MDX Query. When I use the Aggregate
function with a DISTINCT COUNT Measure, get the following error.
--------------------------------------
Unable to open cellset

Formula error - aggregations are not supported for the DISTINCT COUNT
measure "Invoice Number" - in the Aggregate function
-------------------------
My Query is given below:
With
Member [Geography].[Filter] As 'Aggregate({[Geography].[USA],
[Geography].[India]})'
Select
{[Measures].[Invoice No]} On Columns,
{[Customer].[Customer Name].Members} On Rows
From
Sales
Where ([Geography].[Filter])

Please help in resolving this problem.

Thanks in advance.

Manoj



Reply With Quote
  #3  
Old   
Mosha Pasumansky [MS]
 
Posts: n/a

Default Re: Aggregate() Function and DISTINCT COUNT - 12-14-2004 , 06:47 PM



Just wanted to mention, that it is possible in Yukon.

--
==================================================
Mosha Pasumansky - http://www.mosha.com/msolap
Analysis Services blog at http://www.sqljunkies.com/WebLog/mosha
Development Lead in the Analysis Server team
All you need is love (John Lennon)
Disclaimer : This posting is provided "AS IS" with no warranties, and
confers no rights.
==================================================

"Jéjé" <willgart_A_ (AT) hotmail_A_ (DOT) com> wrote

Quote:
the aggregate function cannot be used against a Distinct count measure
(standard measure)
you have to create a calculated distinct count to do this.


"Manoj" <Manoj (AT) discussions (DOT) microsoft.com> wrote in message
news:C6FC46BC-A569-489A-BBC6-067596E4DF55 (AT) microsoft (DOT) com...
Hello,

I have one problem in writing an MDX Query. When I use the Aggregate
function with a DISTINCT COUNT Measure, get the following error.
--------------------------------------
Unable to open cellset

Formula error - aggregations are not supported for the DISTINCT COUNT
measure "Invoice Number" - in the Aggregate function
-------------------------
My Query is given below:
With
Member [Geography].[Filter] As 'Aggregate({[Geography].[USA],
[Geography].[India]})'
Select
{[Measures].[Invoice No]} On Columns,
{[Customer].[Customer Name].Members} On Rows
From
Sales
Where ([Geography].[Filter])

Please help in resolving this problem.

Thanks in advance.

Manoj





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.