<div dir="ltr"> When you create a parent-child hierarchy, if you aren't using a closure table all you have to do is make sure the keys line up. 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> Once you have that working, add a closure table -- you'll need this for performance reasons -- and try it out to make sure everything is still working properly. Here's an example:<br><br><Schema name="whatever"><br>
..<Dimension type="StandardDimension" name="Group"><br>....<Hierarchy<br>......name="Group Hierarchy"<br>......hasAll="true"<br>......allMemberName="All Groups"<br>
......allLevelName="All"<br>......primaryKey="group_tk"<br>....><br>......<Level name="Groups"<br>........column="group_tk"<br>........nameColumn="grp_label"<br>........ordinalColumn="grp_label"<br>
........parentColumn="group_parent_fk"<br>........nullParentValue="0"<br>........type="Numeric"<br>........uniqueMembers="true"<br>........levelType="Regular"<br>........hideMemberIf="Never"<br>
......><br>........<Closure parentColumn="group_parent_fk" childColumn="group_tk"><br>..........<Table name="groupdimension_closure" /><br>........</Closure><br>......</Level><br>
....</Hierarchy><br>..</Dimension><br>..<Cube (...)><br>....<DimensionUsage source="Group" name="Group" foreignKey="group_fk" /><br>....<Measure name="Total Sales" column="sales" datatype="Numeric" aggregator="sum" visible="true /><br>
....(...)<br>..</Cube><br></Schema><br><br>-Brian<br><div class="gmail_quote">On Tue, Oct 14, 2008 at 1:57 AM, Eduardo Andrade <span dir="ltr"><<a href="mailto:eduardofandrade@gmail.com">eduardofandrade@gmail.com</a>></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'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
"nameColumn" 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's probably a good idea to create a mondrian user list, i'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>