<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE type=text/css><!-- DIV {margin:0px;} --></STYLE>
<META content="MSHTML 6.00.6000.16546" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2>This thread should have stayed on the developers' list. (I
don't usually broaden personal messages to public lists, because I don't want to
inadvertently publish confidential information. But I took the liberty of Cc:ing
the developer's list this time.)</FONT></SPAN></DIV></FONT></SPAN></DIV>
<DIV><FONT face=Verdana color=#000080 size=2></FONT><FONT face=Verdana
color=#000080 size=2></FONT><FONT face=Verdana color=#000080 size=2></FONT><FONT
face=Verdana color=#000080 size=2></FONT><FONT face=Verdana color=#000080
size=2></FONT><FONT face=Verdana color=#000080 size=2></FONT><FONT face=Verdana
color=#000080 size=2></FONT><FONT face=Verdana color=#000080 size=2></FONT><FONT
face=Verdana color=#000080 size=2></FONT><FONT face=Verdana color=#000080
size=2></FONT><FONT face=Verdana color=#000080 size=2></FONT><BR></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>michael bienstein <SPAN class=461022723-22112007><FONT
face=Verdana color=#000080> wrote: </FONT></SPAN></FONT><BR></DIV>
<DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial,helvetica,sans-serif">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial,helvetica,sans-serif">The
requirement is that at any organisation/time crossing the budget user can
enter a number. Even if all child organisations have numbers the parent
is NOT aggregated and could be contradictory. Bizarre requirement that,
but that's the way it's currently done and they want the same thing only for
it to run faster so I'm proposing to change technology.</DIV></DIV></BLOCKQUOTE>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial,helvetica,sans-serif"><SPAN
class=461022723-22112007>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2>Since we're talking about developing a feature, let's see
how we can broaden the requirement to cover other common cases, without making
the specification or implementation much more complicated.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2>In the case of non-aggregatable measures, we could model
these as an aggregation function NONE.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2>I suppose if you are going to define such a measure, you
need to ensure that your fact table contains at must one row per cell. Mondrian
could enforce that by generating MAX and MIN and comparing
them.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2>Also, I can imagine a measure which can be rolled up along
some dimensions but not others; maybe not in your application, but in
others.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2>I experienced this with distinct-count measures. For
example, the number of distinct customers can be aggregated over the gender
dimension, but not over the time dimension. (If you have 10 distinct female
customers in Q1 and 5 distinct male customers in Q1, you definitely have 15
distinct customers in Q1. Why can you say that? Because gender is functionally
dependent on customer id.)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2>Also, consider semi-additive measures, the textbook example
of which is inventory-on-hand. This measure is aggregated using the LAST
operator on the time dimension, SUM operator on other dimensions (e.g.
product).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2>Putting this all together, I see a measure being defined
with a default aggregation function, which may be SUM, AVG, FIRST, LAST, NONE;
and being able to override the aggregation function for certain
dimensions:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2><Cube></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2> ...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2> <Measure name="Inventory on hand"
aggregator="sum"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2> <RollupRule
dimension="Time" aggregator="last"/></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2> </Measure></FONT></SPAN></DIV>
<DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2> <Measure name="Customer count"
aggregator="distinct-count"></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2> <RollupRule
dimension="Gender" aggregator="sum"/></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2> </Measure></FONT></SPAN></DIV></DIV>
<DIV><FONT face=Verdana color=#000080 size=2>
<DIV>
<DIV dir=ltr align=left><SPAN class=461022723-22112007><FONT face=Verdana
color=#000080 size=2> <Measure name="Budget"
aggregator="none"/></FONT></SPAN></DIV></DIV></FONT></DIV>
<DIV><FONT face=Verdana color=#000080 size=2><SPAN
class=461022723-22112007></Cube></SPAN></FONT></DIV>
<DIV><FONT face=Verdana color=#000080 size=2></FONT> </DIV>
<DIV><SPAN class=461022723-22112007><FONT face=Verdana color=#000080 size=2>Is
this more general scheme still consistent with your requirements? It would
certainly be nice to deal with semi-additive measures properly at the same
time.</FONT></SPAN></DIV>
<DIV><SPAN class=461022723-22112007><FONT face=Verdana color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=461022723-22112007><FONT face=Verdana color=#000080
size=2>Julian</FONT></SPAN></DIV></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial,helvetica,sans-serif"><SPAN
class=461022723-22112007><FONT face=Verdana color=#000080
size=2></FONT></SPAN> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial,helvetica,sans-serif"><SPAN
class=461022723-22112007> </SPAN><BR>Thanks Julian, I'll have a look at
that.<BR>Michael<BR><BR><BR></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">-----
Message d'origine ----<BR>De : Julian Hyde <jhyde@pentaho.org><BR>À :
Mondrian developer mailing list <mondrian@pentaho.org><BR>Envoyé le :
Jeudi, 22 Novembre 2007, 1h53mn 12s<BR>Objet : RE: [Mondrian] Question on
non-aggregable measures<BR><BR>
<DIV dir=ltr align=left><SPAN class=788184900-22112007><FONT face=Verdana
color=#000080 size=2>We already have the mother of all non-aggregable
measures, namely distinct-count. It's slightly different in that it's
computable by going back to the fact table, whereas for what you want, if it's
not in the agg table, it ain't there at all. (Or maybe you would allow
aggregation on some dimensions but not others - I don't know your precise
requirements.)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=788184900-22112007><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=788184900-22112007><FONT face=Verdana
color=#000080 size=2>So, it isn't there, but it could be fairly easily
implemented by generalizing the distinct-count
functionality.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=788184900-22112007><FONT face=Verdana
color=#000080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=788184900-22112007><FONT face=Verdana
color=#000080 size=2>Julian</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,128) 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mondrian-bounces@pentaho.org
[mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of </B>michael
bienstein<BR><B>Sent:</B> Wednesday, November 21, 2007 11:16
PM<BR><B>To:</B> Mondrian developer mailing list<BR><B>Subject:</B>
[Mondrian] Question on non-aggregable measures<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial,helvetica,sans-serif">
<DIV>Hello all,<BR><BR>I may very well use Mondrian in a short project
soon. One point that I think is probably missing that is part of the
requirements is a non-aggregable measure that is read only from aggregation
tables. E.g. a budget or objective that is filled in at certain
members of an org hierarchy but not all and certainly not aggregated from
facts attached to the leaves. <BR><BR>I don't know if this can be
handled by the existing code (it's been more than 6 months since I last
looked at the code). Can anyone tell me
please?<BR><BR>Thanks,<BR><BR>Michael<BR></DIV></DIV><BR>
<HR SIZE=1>
Ne gardez plus qu'une seule adresse mail ! <A
href="http://www.trueswitch.com/yahoo-fr/" target=_blank rel=nofollow>Copiez
vos mails</A> vers Yahoo! Mail </BLOCKQUOTE></DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: arial,helvetica,sans-serif"><BR></DIV><BR>
<HR SIZE=1>
Ne gardez plus qu'une seule adresse mail ! <A
href="http://www.trueswitch.com/yahoo-fr/">Copiez vos mails</A> vers Yahoo!
Mail </BLOCKQUOTE></BODY></HTML>