Re: Problems mith the MDX Count fuction - it returns 2 for a set with 1 element
- From: "Jéjé" <willgart@xxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Jul 2005 21:46:09 -0400
its not a problem, because you have a multiple selection
In your case you select 2 products, so the "*count" is aggregate 2 times (so
1 + 1 = 2)
if you select 3 products you'll have 3 etc...
I think you want a distinct count measure?
I mean you want top count the unique number of customers with sales in the 2
product.
Lookat the MSDN web site and search for basket analysis & distinct count
measures.
"Thomas Rath (MIS)" <trath@xxxxxxxxx> wrote in message
news:em0Z68vhFHA.4048@xxxxxxxxxxxxxxxxxxxxxxx
> Hello,
>
> I have a MDX statement for the AS2K Foodmart 2000 database which returns
> strange results. I want to count the elements of a set of elements and
> show it to the user. I modified my original example as much as possible to
> reproduce the problem. The result is the MDX statement below - one would
> assume that MDX would return 1 as [Customers].[*Count] because there is
> only one element in the set - unfortunately it returns two ... I there
> anyone who can explain this behavior?
>
> Thanks a lot for any help
> Thomas
>
> MDX sample for AS2K Foodmart 2000 database:
>
> with
> member [Customers].[*Count] as 'Count({[Customers].[All
> Customers].[USA].[CA]})'
> member [Product].[<Multiple Selection>] as 'aggregate({[Product].[All
> Products].[Drink], [Product].[All Products].[Food]})'
> select
> {[Customers].[All Customers].[USA].[CA],[Customers].[*Count]} on rows,
> {[Gender].[All Gender]} on columns
> from [Sales]
> where [Product].[<Multiple Selection>]
>
>
.
- References:
- Problems mith the MDX Count fuction - it returns 2 for a set with 1 element
- From: Thomas Rath \(MIS\)
- Problems mith the MDX Count fuction - it returns 2 for a set with 1 element
- Prev by Date: Re: Oracle schema names used in Analysis Services tables.
- Next by Date: Re: How to enable Analysis Services with IIS on Win 2K
- Previous by thread: Problems mith the MDX Count fuction - it returns 2 for a set with 1 element
- Next by thread: Sum({[Tiempo].[Normal].currentmember},[Measures].[Valor])
- Index(es):
Relevant Pages
|