Re: Problems mith the MDX Count fuction - it returns 2 for a set with 1 element

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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>]
>
>


.



Relevant Pages

  • Problems mith the MDX Count fuction - it returns 2 for a set with 1 element
    ... I have a MDX statement for the AS2K Foodmart 2000 database which returns ... strange results. ...
    (microsoft.public.sqlserver.olap)
  • Re: Proper use of database splitting
    ... If it were me Id set it up as similar to a sales logic ERP program that a ... Main database backend on the server has everything. ... the process of doing this all of his customer records gets a CustCheckedOut ... Sales rep comes back with a boat load of sales and new accounts. ...
    (microsoft.public.access.formscoding)
  • Re: Can databases form automatic calculations?
    ... Basically I would like to know if there is some way to get a database ... All my product sales are ... Anyone know the MySQL function syntax for this if it is possible? ... The user interface is the SQL language which can be invoked ...
    (comp.databases)
  • Re: Proper use of database splitting
    ... Put the master backend template on the server so that all sales reps use the ... Also require all sales reps to put their backend database ... upload and down load customer databases and not need to do anything else. ...
    (microsoft.public.access.formscoding)
  • Re: Can databases form automatic calculations?
    ... Basically I would like to know if there is some way to get a database ... All my product sales are ... Anyone know the MySQL function syntax for this if it is possible? ... The user interface is the SQL language which can be invoked ...
    (comp.databases)