<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:m = 
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928"><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: Consolas;
}
@font-face {
        font-family: Lucida Sans;
}
@page WordSection1 {size: 8.5in 11.0in; margin: 56.7pt 42.5pt 56.7pt 85.05pt; }
P.MsoNormal {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
LI.MsoNormal {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
DIV.MsoNormal {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"; FONT-SIZE: 12pt
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P.MsoPlainText {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: Consolas; FONT-SIZE: 10.5pt; mso-style-priority: 99; mso-style-link: "Plain Text Char"
}
LI.MsoPlainText {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: Consolas; FONT-SIZE: 10.5pt; mso-style-priority: 99; mso-style-link: "Plain Text Char"
}
DIV.MsoPlainText {
        MARGIN: 0in 0in 0pt; FONT-FAMILY: Consolas; FONT-SIZE: 10.5pt; mso-style-priority: 99; mso-style-link: "Plain Text Char"
}
SPAN.EmailStyle17 {
        FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d; mso-style-type: personal-reply
}
SPAN.PlainTextChar {
        FONT-FAMILY: Consolas; mso-style-priority: 99; mso-style-link: "Plain Text"; mso-style-name: "Plain Text Char"
}
.MsoChpDefault {
        FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.WordSection1 {
        page: WordSection1
}
</STYLE>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US link=blue vLink=purple>
<DIV><SPAN class=502170101-19062010><FONT color=#000080 size=2 
face="Lucida Sans">Sergey,</FONT></SPAN></DIV>
<DIV><SPAN class=502170101-19062010><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=502170101-19062010><FONT color=#000080 size=2 
face="Lucida Sans">I fixed MONDRIAN-682 on Tuesday of this week. (Sorry it took 
me so long... I really intended to include your patch in 3.2.0, but I forgot; it 
will be in 3.2.1.)</FONT></SPAN></DIV>
<DIV><SPAN class=502170101-19062010><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=502170101-19062010><FONT color=#000080 size=2 
face="Lucida Sans">Can you clarify. Does that mean that "AVG" should be able to 
rollup automatically? Or that there is a workaround by rephrasing the query? Or 
is another change to mondrian's source code required in order to fix 
MONDRIAN-675?</FONT></SPAN></DIV>
<DIV><SPAN class=502170101-19062010><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=502170101-19062010><FONT color=#000080 size=2 
face="Lucida Sans">Julian</FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> Sergey Mazin 
  [mailto:sergey.mazin@skype.net] <BR><B>Sent:</B> Wednesday, June 16, 2010 3:06 
  PM<BR><B>To:</B> jhyde@pentaho.com; 'Mondrian developer mailing 
  list'<BR><B>Subject:</B> RE: [Mondrian] Excel + MondrianEvaluationException: 
  Don't know how torollup aggregator 'avg'<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV class=WordSection1>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt">Hi 
  Julian,<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt"><o:p>&nbsp;</o:p></SPAN></P>
  <P class=MsoPlainText><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt">Once 
  </SPAN>MONDRIAN-682<SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt"> issue is fixed 
  we can have the same logic for &#8220;avg&#8221; measure as for &#8220;distinct-count&#8221; 
  measure.<o:p></o:p></SPAN></P>
  <P class=MsoPlainText><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt">We send separate 
  query with avg aggregate function for each level in the 
  query.<o:p></o:p></SPAN></P>
  <P class=MsoPlainText><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; FONT-SIZE: 11pt"><o:p>&nbsp;</o:p></SPAN></P>
  <P class=MsoPlainText>I changed 3 lines in the code and now it seems to work 
  for me.<o:p></o:p></P>
  <P class=MsoPlainText><o:p>&nbsp;</o:p></P>
  <P class=MsoPlainText>Regards,<o:p></o:p></P>
  <P class=MsoPlainText>Sergey<o:p></o:p></P>
  <P class=MsoPlainText><o:p>&nbsp;</o:p></P>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #1f497d; FONT-SIZE: 11pt"><o:p>&nbsp;</o:p></SPAN></P>
  <DIV>
  <DIV 
  style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
  <P class=MsoNormal><B><SPAN 
  style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN 
  style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> 
  mondrian-bounces@pentaho.org [mailto:mondrian-bounces@pentaho.org] <B>On 
  Behalf Of </B>Julian Hyde<BR><B>Sent:</B> Thursday, May 20, 2010 11:29 
  PM<BR><B>To:</B> 'Mondrian developer mailing list'<BR><B>Subject:</B> RE: 
  [Mondrian] Excel + MondrianEvaluationException: Don't know how torollup 
  aggregator 'avg'<o:p></o:p></SPAN></P></DIV></DIV>
  <P class=MsoNormal><o:p>&nbsp;</o:p></P>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Lucida Sans','serif'; COLOR: navy; FONT-SIZE: 10pt">It's 
  Mondrian problem, not specific to Excel.</SPAN><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal>&nbsp;<o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Lucida Sans','serif'; COLOR: navy; FONT-SIZE: 10pt">Mondrian 
  is being truthful -- it can't know to roll up averages.&nbsp;If I tell you the 
  average age of Male customers is 32 and the average age of Female customers is 
  28, what's the average age of all customers? There's simply not enough 
  information.</SPAN><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal>&nbsp;<o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Lucida Sans','serif'; COLOR: navy; FONT-SIZE: 10pt">However, 
  if you replace your 'avg' measure with two stored measures 'sum' and 'count', 
  then create a calculated measure from these, you will be able to roll 
  up.</SPAN><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal>&nbsp;<o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Lucida Sans','serif'; COLOR: navy; FONT-SIZE: 10pt">There 
  is a feature request to make mondrian smart enough to do this automatically: 
  <A href="http://jira.pentaho.com/browse/MONDRIAN-675"><SPAN 
  style="FONT-FAMILY: 'Times New Roman','serif'; FONT-SIZE: 12pt">http://jira.pentaho.com/browse/MONDRIAN-675</SPAN></A></SPAN><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal>&nbsp;<o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-FAMILY: 'Lucida Sans','serif'; COLOR: navy; FONT-SIZE: 10pt">Julian</SPAN><o:p></o:p></P></DIV>
  <BLOCKQUOTE 
  style="BORDER-BOTTOM: medium none; BORDER-LEFT: navy 1.5pt solid; PADDING-BOTTOM: 0in; MARGIN: 5pt 0in 5pt 3.75pt; PADDING-LEFT: 4pt; PADDING-RIGHT: 0in; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in">
    <P class=MsoNormal><o:p>&nbsp;</o:p></P>
    <DIV style="TEXT-ALIGN: center" class=MsoNormal align=center>
    <HR align=center SIZE=2 width="100%">
    </DIV>
    <P style="MARGIN-BOTTOM: 12pt" class=MsoNormal><B><SPAN 
    style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt">From:</SPAN></B><SPAN 
    style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"> 
    mondrian-bounces@pentaho.org [mailto:mondrian-bounces@pentaho.org] <B>On 
    Behalf Of </B>Manuel Darveau<BR><B>Sent:</B> Thursday, May 20, 2010 8:54 
    AM<BR><B>To:</B> mondrian@pentaho.org<BR><B>Subject:</B> [Mondrian] Excel + 
    MondrianEvaluationException: Don't know how torollup aggregator 
    'avg'</SPAN><o:p></o:p></P>
    <P class=MsoNormal>Hi,<BR><BR>I am using excel 2007 (+ simba O2X plugin) and 
    connect to mondrian via XMLA.<BR>Most queries are working perfectly (as far 
    as mondrian is concerned) but he's having a hard time with one particular 
    type of query.<BR><BR>I have a dimension with days of week (the dimension 
    hierarchy is year/month/day of week) and I would like to filter so only some 
    day of weeks are used. In excel, you can add a filter, check the "Select 
    Multiple Items" and select elements you need.<BR>If I query fact count, min, 
    max, I don't have any problem. If I query an avg dimension, I get the 
    following exception:<BR><BR>2010.05.20;11:38:49.892 WARN&nbsp; Mondrian: 
    exception in 
    executeStripe.<BR>mondrian.olap.fun.MondrianEvaluationException: Don't know 
    how to rollup aggregator 'avg'<BR>&nbsp;&nbsp;&nbsp; at 
    mondrian.olap.fun.FunUtil.newEvalException(FunUtil.java:76)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.olap.fun.AggregateFunDef$AggregateCalc.aggregate(AggregateFunDef.java:99)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.olap.fun.AggregateFunDef$AggregateCalc.evaluate(AggregateFunDef.java:71)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.rolap.RolapEvaluator.evaluateCurrent(RolapEvaluator.java:512)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.rolap.RolapResult.executeStripe(RolapResult.java:902)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1040)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1040)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.rolap.RolapResult.executeBody(RolapResult.java:798)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.rolap.RolapResult.&lt;init&gt;(RolapResult.java:416)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.rolap.RolapConnection.execute(RolapConnection.java:607)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.xmla.XmlaHandler.executeQuery(XmlaHandler.java:1668)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.xmla.XmlaHandler.execute(XmlaHandler.java:635)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.xmla.XmlaHandler.process(XmlaHandler.java:551)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.xmla.impl.DefaultXmlaServlet.handleSoapBody(DefaultXmlaServlet.java:426)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    mondrian.xmla.XmlaServlet.doPost(XmlaServlet.java:329)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:727)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    javax.servlet.http.HttpServlet.service(HttpServlet.java:820)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)<BR>&nbsp;&nbsp;&nbsp; 
    at org.mortbay.jetty.Server.handle(Server.java:326)<BR>&nbsp;&nbsp;&nbsp; at 
    org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)<BR>&nbsp;&nbsp;&nbsp; 
    at 
    org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)<BR><BR>The 
    MDX query is:<BR>with member [Date.date_weekday].[XL_QZX] as 
    'Aggregate({[Date.date_weekday].[2010].[April].[Saturday], 
    [Date.date_weekday].[2010].[April].[Sunday]})'<BR>select NON EMPTY 
    Hierarchize({DrilldownLevel({[Time.TimeToQuarter].[All 
    Time.TimeToQuarters]})}) DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON 
    COLUMNS<BR>from [Station]<BR>where ([Measures].[AverageFullPercent], 
    [Date.date_weekday].[XL_QZX])<BR><BR>I don't speak MDX fluently so can 
    anybody confirm that this is a mondrian or an excel problem?<BR><BR>I am 
    using the mondrian 3.2.0.13583 but I am willing to try nightly 
    builds.<BR><BR>Thank you very much, any help is greatly 
    appreciated!<BR><BR>Manuel<o:p></o:p></P></BLOCKQUOTE></DIV></BLOCKQUOTE></BODY></HTML>