[Mondrian] Adding Grouping Set support for Distinct Count measures

Matt Campbell mkambol at gmail.com
Tue Jan 29 10:09:39 EST 2008


Misguided, probably.  But an MDX Set does allow this sort of non-set like
behavior.  The following MDX, when run in Analysis Services, will produce 2
times the [unit sales] of [marital status].[m]:


with member [marital status].ASetIsNotASet as
'Aggregate( {[Marital Status].[All Marital Status].[M], [Marital
Status].[All Marital Status].[M] }, measures.[unit sales] )'
select {[marital status].ASetIsNotASet } on 0 from sales where
measures.[unit sales]

On Jan 28, 2008 5:33 PM, John V. Sichi <jsichi at gmail.com> wrote:

> Ajit Vasudeo Joglekar wrote:
> > 2) Aggregation of a normal (non distinct count) measure for select
> members
> >
> > It is possible to get this working since it is very similar to case 1).
> > There is a issue here though. Lets say for whatever reason user wants to
> > aggregate
> >
> > Aggregate([Store].[All Stores].[USA].[CA], [Store].[All
> > Stores].[USA].[CA], [Store].[All Stores].[USA].[OR]) over
> > [Measures].[Unit Sales]. The expected value here is (2 * CA + OR) for a
> > non distinct count measure. The sql generated like above will not result
> > in correct aggregation value
>
> I don't see an issue here; the desire to "double-count" CA by including
> it in the set twice would be misguided, since a set is a set (no dups).
>
> JVS
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20080129/a92a2cda/attachment.html 


More information about the Mondrian mailing list