<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style><br>
http://msdn.microsoft.com/en-us/library/ms145527.aspx<br>
<br>
VisualTotals is probably what you are looking for.<br>
<br>
Tom<br>
 <br>
<br>
<span style="font-weight: bold;">On Mon  7/09/09  1:27 PM , Rui Gonçalves rui.pinho.goncalves@gmail.com sent:<br>
</span><blockquote style="border-left: 2px solid rgb(245, 245, 245); margin-left: 5px; margin-right: 0px; padding-left: 5px; padding-right: 0px;"><defanged_meta http-equiv="Content-Type" content="text/html; charset=utf-8"><defanged_meta name="ProgId" content="Word.Document"><defanged_meta name="Generator" content="Microsoft Word 12"><defanged_meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CRGONCA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CRGONCA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CRGONCA%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml">
<style><!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;
        mso-font-charset:0;
        mso-generic-font-family:roman;
        mso-font-pitch:variable;
        mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:-1610611985 1073750139 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-unhide:no;
        mso-style-qformat:yes;
        mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;}
span.EmailStyle15
        {mso-style-type:personal;
        mso-style-noshow:yes;
        mso-style-unhide:no;
        mso-ansi-font-size:11.0pt;
        mso-bidi-font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-default-props:yes;
        mso-ascii-font-family:Calibri;
        mso-ascii-theme-font:minor-latin;
        mso-fareast-font-family:Calibri;
        mso-fareast-theme-font:minor-latin;
        mso-hansi-font-family:Calibri;
        mso-hansi-theme-font:minor-latin;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;
        mso-header-margin:36.0pt;
        mso-footer-margin:36.0pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>

<p class="MsoNormal">Hi All,</p>

<p class="MsoNormal">&nbsp;</p>

<p class="MsoNormal">I’m relatively new to Mondrian and Jpivot .</p>

<p class="MsoNormal">I would like to have a calculated total for hierarquies and level’s.</p>

<p class="MsoNormal">Example:</p>

<p class="MsoNormal">select NON EMPTY {[Measures].[Quantity]} ON COLUMNS,<br>

&nbsp; NON EMPTY Hierarchize(Union({[Product].[All Products]}, [Product].[All Products].Children)) ON ROWS<br>

from [SteelWheelsSales]<br>

</p>
<p class="MsoNormal"><br>

</p>Output: <br>
<table class="mdxtable" id="table9484d0bb-9ba3-11de-9294-b9bdcbcba4a3" border="0" cellpadding="2" cellspacing="1"><tbody>
<tr>
<th class="corner-heading" nowrap="nowrap"><br>
</th>
<th class="heading-heading" nowrap="nowrap"><img src="" alt="Blocked image">Measures</th></tr>
<tr>
<th class="heading-heading" nowrap="nowrap"><img src="" alt="Blocked image">Product</th>
<th class="column-heading-even" nowrap="nowrap"><input title="Natural Order" src="/pentaho/jpivot/table/sort-natural.gif" name="wcf35991a80" border="0" height="9" type="image" width="9"><img src="" alt="Blocked image">Quantity</th>
</tr>
<tr>
<th class="row-heading-even" nowrap="nowrap">
<div style="margin-left: 0em;"><input title="" src="/pentaho/jpivot/table/drill-position-collapse.gif" name="wcff19b7854" border="0" height="16" type="image" width="16">All Products</div></th>
<td class="cell-even" nowrap="nowrap">105.331</td></tr>
<tr>
<th class="row-heading-odd" nowrap="nowrap">
<div style="margin-left: 1em;"><input title="" src="/pentaho/jpivot/table/drill-position-expand.gif" name="wcfffa64ca" border="0" height="16" type="image" width="16">Classic Cars</div></th>
<td class="cell-odd" nowrap="nowrap">35.552</td></tr>
<tr>
<th class="row-heading-even" nowrap="nowrap">
<div style="margin-left: 1em;"><input title="" src="/pentaho/jpivot/table/drill-position-expand.gif" name="wcf44ed35ef" border="0" height="16" type="image" width="16">Motorcycles</div></th>
<td class="cell-even" nowrap="nowrap">12.708</td></tr>
<tr>
<th class="row-heading-odd" nowrap="nowrap">
<div style="margin-left: 1em;"><input title="" src="/pentaho/jpivot/table/drill-position-expand.gif" name="wcf6992b59c" border="0" height="16" type="image" width="16">Planes</div></th>
<td class="cell-odd" nowrap="nowrap">11.860</td></tr>
<tr>
<th class="row-heading-even" nowrap="nowrap">
<div style="margin-left: 1em;"><input title="" src="/pentaho/jpivot/table/drill-position-expand.gif" name="wcfeaa422cc" border="0" height="16" type="image" width="16">Ships</div></th>
<td class="cell-even" nowrap="nowrap">8.499</td></tr>
<tr>
<th class="row-heading-odd" nowrap="nowrap">
<div style="margin-left: 1em;"><input title="" src="/pentaho/jpivot/table/drill-position-expand.gif" name="wcf4a359c9" border="0" height="16" type="image" width="16">Trains</div></th>
<td class="cell-odd" nowrap="nowrap">2.818</td></tr>
<tr>
<th class="row-heading-even" nowrap="nowrap">
<div style="margin-left: 1em;"><input title="" src="/pentaho/jpivot/table/drill-position-expand.gif" name="wcf525dad6c" border="0" height="16" type="image" width="16">Trucks and Buses</div></th>
<td class="cell-even" nowrap="nowrap">11.001</td></tr>
<tr>
<th class="row-heading-odd" nowrap="nowrap">
<div style="margin-left: 1em;"><input title="" src="/pentaho/jpivot/table/drill-position-expand.gif" name="wcf5b7c05de" border="0" height="16" type="image" width="16">Vintage Cars</div></th>
<td class="cell-odd" nowrap="nowrap">22.893</td></tr></tbody></table><p class="MsoNormal"><br>
</p>In this sample, the total for the product column is the same as the value for [Product].[All Products]<br>
<p class="MsoNormal"></p>
<p class="MsoNormal"><br>
</p><p class="MsoNormal">If the user wishes to select only some of the "products" in the hierarquie:</p><p class="MsoNormal"><br>
</p><p class="MsoNormal">For Example:<br>
</p><p class="MsoNormal">
select NON EMPTY {[Measures].[Quantity]} ON COLUMNS,<br>
&nbsp; NON EMPTY {[Product].[All Products], [Product].[All Products].[Classic Cars], [Product].[All Products].[Vintage Cars]} ON ROWS<br>
from [SteelWheelsSales]<br>
</p><p class="MsoNormal">
<br>
</p><p class="MsoNormal">The Output is:<br>
</p><table class="mdxtable" id="table9484d0bb-9ba3-11de-9294-b9bdcbcba4a3" border="0" cellpadding="2" cellspacing="1"><tbody>
<tr>
<th class="corner-heading" nowrap="nowrap"><br>
</th>
<th class="heading-heading" nowrap="nowrap"><img src="" alt="Blocked image">Measures</th></tr>
<tr>
<th class="heading-heading" nowrap="nowrap"><img src="" alt="Blocked image">Product</th>
<th class="column-heading-even" nowrap="nowrap"><input title="Natural Order" src="/pentaho/jpivot/table/sort-natural.gif" name="wcf9416e090" border="0" height="9" type="image" width="9"><img src="" alt="Blocked image">Quantity</th>
</tr>
<tr>
<th class="row-heading-even" nowrap="nowrap">
<div style="margin-left: 0em;"><input title="" src="/pentaho/jpivot/table/drill-position-collapse.gif" name="wcf9d75b0ae" border="0" height="16" type="image" width="16">All Products</div></th>
<td class="cell-even" nowrap="nowrap">105.331</td></tr>
<tr>
<th class="row-heading-odd" nowrap="nowrap">
<div style="margin-left: 1em;"><input title="" src="/pentaho/jpivot/table/drill-position-expand.gif" name="wcfba75fce3" border="0" height="16" type="image" width="16">Classic Cars</div></th>
<td class="cell-odd" nowrap="nowrap">35.552</td></tr>
<tr>
<th class="row-heading-even" nowrap="nowrap">
<div style="margin-left: 1em;"><input title="" src="/pentaho/jpivot/table/drill-position-expand.gif" name="wcf7931ef63" border="0" height="16" type="image" width="16">Vintage Cars</div></th>
<td class="cell-even" nowrap="nowrap">22.893</td></tr></tbody></table><p class="MsoNormal"><br>
</p><p class="MsoNormal">And the total for this column will be 58.445 (Classic Cars + Vintage Cars)<br>
</p><p class="MsoNormal"><br>
</p>
<p class="MsoNormal">&nbsp;</p><p class="MsoNormal">I would like to know if it's possible to create a calculated column (or some other thing) that computes the total for whatever slices are selected by the user in a hierarquie. Is it possible to do it using running totals? If so could you advise how?<br>

</p><p class="MsoNormal"><br>
</p>

<p class="MsoNormal">I need this total value to use it in some more calculations,
like some percentages and so on.</p>

<p class="MsoNormal"><br>
</p><p class="MsoNormal"><br>
</p>

<p class="MsoNormal">The really nice solution would be to have a way to tell Mondrian
to calculate a total for the (displayed values in a) [Dimension].[Hierarquie]</p>

<p class="MsoNormal">&nbsp;</p><p class="MsoNormal"><br>
</p><p class="MsoNormal">Thank's<br>
</p><p class="MsoNormal">Regards,</p><p class="MsoNormal">Rui<br>
</p>



</defanged_meta></defanged_meta></defanged_meta></defanged_meta></blockquote><BR></HTML>