<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18813"></HEAD>
<BODY>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans">I don't think you can achieve this using formatting alone. I 
think you need to calculate a new measure.</FONT></SPAN></DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=390275117-07082009><SPAN class=390275117-07082009><FONT 
color=#000080 size=2 face="Lucida Sans">Analysis Services has a Floor function 
(inherited from Excel) but it is not implemented in Mondrian. So we can achieve 
the behavior using Round. (Formula is a bit more complicated if [Dias] can be 
negative. Exercise for the reader.)</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans">&lt;CalculatedMember name="Floor Dias" 
dimension="Measures"&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans">&nbsp;&nbsp;&nbsp; &lt;Formula&gt;Round([Measures].[Dias] - 
0.5)&lt;/Formula&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans">&lt;/CalcMeasure&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans">Someone could contribute the Floor function. Code changes 
would be required to Excel.java and ExcelTest.java.</FONT></SPAN></DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans">Julian</FONT></SPAN></DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=390275117-07082009><FONT color=#000080 size=2 
face="Lucida Sans"></FONT></SPAN>&nbsp;</DIV>
<DIV><BR></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000080 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> mondrian-bounces@pentaho.org 
  [mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of </B>Eduardo 
  Andrade<BR><B>Sent:</B> Friday, August 07, 2009 9:15 AM<BR><B>To:</B> Mondrian 
  Mailing List<BR><B>Subject:</B> [Mondrian] Truncate decimal places in a 
  measure aggregation<BR></FONT><BR></DIV>
  <DIV></DIV>Hello guys,<BR>I'm here knocking with my head and I can't get the 
  result that I want. I've searched on the xml_Schema page, the 
  mondrian-2.2.2-technical-guide.pdf, and on the forums, but failed to find an 
  anser to my question.<BR><BR>Is it possible to format a measure truncating 
  decimal places to its aggregated value in the mondrian xml definition ?<BR 
  clear=all><BR>Example :<BR>I've got the measure :<BR>&nbsp;&nbsp;&nbsp; 
  &lt;Measure column="IPAPERIODOCALC" name="Dias" aggregator="sum" 
  formatString="###,##0"/&gt;<BR><BR>And the sum is 134.87.<BR>What I would like 
  to show is 134 only, but it shows 135.<BR><BR>Does anyone knows if it is 
  possible to do this ?<BR><BR>Thank you.<BR><BR>Regards,<BR>-- <BR>Eduardo 
  Andrade<BR><A 
  href="mailto:eduardofandrade@gmail.com">eduardofandrade@gmail.com</A><BR></BLOCKQUOTE></BODY></HTML>