<div dir="ltr">&nbsp; When you create a parent-child hierarchy, if you aren&#39;t using a closure table all you have to do is make sure the keys line up.&nbsp; Assuming a simple measure, one located in your fact table, your defined measure will have an aggregate function defined for it, and Mondrian should handle it just fine.<br>
<br>&nbsp; Once you have that working, add a closure table -- you&#39;ll need this for performance reasons -- and try it out to make sure everything is still working properly.&nbsp; Here&#39;s an example:<br><br>&lt;Schema name=&quot;whatever&quot;&gt;<br>
..&lt;Dimension type=&quot;StandardDimension&quot; name=&quot;Group&quot;&gt;<br>....&lt;Hierarchy<br>......name=&quot;Group Hierarchy&quot;<br>......hasAll=&quot;true&quot;<br>......allMemberName=&quot;All Groups&quot;<br>
......allLevelName=&quot;All&quot;<br>......primaryKey=&quot;group_tk&quot;<br>....&gt;<br>......&lt;Level name=&quot;Groups&quot;<br>........column=&quot;group_tk&quot;<br>........nameColumn=&quot;grp_label&quot;<br>........ordinalColumn=&quot;grp_label&quot;<br>
........parentColumn=&quot;group_parent_fk&quot;<br>........nullParentValue=&quot;0&quot;<br>........type=&quot;Numeric&quot;<br>........uniqueMembers=&quot;true&quot;<br>........levelType=&quot;Regular&quot;<br>........hideMemberIf=&quot;Never&quot;<br>
......&gt;<br>........&lt;Closure parentColumn=&quot;group_parent_fk&quot; childColumn=&quot;group_tk&quot;&gt;<br>..........&lt;Table name=&quot;groupdimension_closure&quot; /&gt;<br>........&lt;/Closure&gt;<br>......&lt;/Level&gt;<br>
....&lt;/Hierarchy&gt;<br>..&lt;/Dimension&gt;<br>..&lt;Cube (...)&gt;<br>....&lt;DimensionUsage source=&quot;Group&quot; name=&quot;Group&quot; foreignKey=&quot;group_fk&quot; /&gt;<br>....&lt;Measure name=&quot;Total Sales&quot; column=&quot;sales&quot; datatype=&quot;Numeric&quot; aggregator=&quot;sum&quot; visible=&quot;true /&gt;<br>
....(...)<br>..&lt;/Cube&gt;<br>&lt;/Schema&gt;<br><br>-Brian<br><div class="gmail_quote">On Tue, Oct 14, 2008 at 1:57 AM, Eduardo Andrade <span dir="ltr">&lt;<a href="mailto:eduardofandrade@gmail.com">eduardofandrade@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr"><p style="margin-bottom: 0cm; font-family: tahoma,sans-serif;">Hello,</p><p style="margin-bottom: 0cm; font-family: tahoma,sans-serif;">
i hope you could guide me on this :<br></p><p style="margin-bottom: 0cm; font-family: tahoma,sans-serif;">


- I&#39;ve two parent child structures for
each one of the fact table rows.<br></p>
<p style="margin-bottom: 0cm; font-family: tahoma,sans-serif;">- Each fact table row points to level
three records of the hierarchical table and Mondrian is able to build the
dimension correctly.</p>
<p style="margin-bottom: 0cm; font-family: tahoma,sans-serif;">But, when building a parent-child
hierarchy I thought Mondrian would group the elements by the defined
&quot;nameColumn&quot; and apply the defined aggregation function (in this
case SUM).</p>
<p style="margin-bottom: 0cm; font-family: tahoma,sans-serif;">I show two results (the obtained one
and the expected one (which i was expecting to see)).</p>

<p style="margin-bottom: 0cm; font-family: tahoma,sans-serif;"><br></p><p style="margin-bottom: 0cm; font-family: tahoma,sans-serif;">Is there a way to achieve this result ?</p><br style="font-family: tahoma,sans-serif;">






<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">Btw, it&#39;s probably a good idea to create a mondrian user list, i&#39;ll be using it for sure :)</span><br style="font-family: tahoma,sans-serif;" clear="all">


<br style="font-family: tahoma,sans-serif;"><span style="font-family: tahoma,sans-serif;">Thank you for your time.</span><br clear="all"><br>-- <br>Eduardo Andrade<br><a href="mailto:eduardofandrade@gmail.com" target="_blank">eduardofandrade@gmail.com</a><br>


</div>
<br>_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a><br>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
<br></blockquote></div><br></div>