.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Parent-Child Hierarchy

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :Sql Server
 

Parent-Child Hierarchy

What's the best way to represent a Parent-Child hierarchy in the Cube? I've seen the Usage that can be applied as Parent.
I've applied this, for example,

ID ParentID CompanyName Rank
1  1  AAA  Excellent
2 1  BBB  Good
3  1  CCC  Ok
4 1  DDD  None

I can link the ID and ParentID Usage appropriately by setting the ParentID to a Usage of Parent. I've also set the Parent Key, so that if the Company rolls up to itself, it doesn't show the Parent as its own child (NonLeafDataHidden).

When using only the CompanyName in the Cube Browser / Excel, this is working okay.

The problem occurs when trying to bring in other attributes, such as Rank.

Dragging the following into the Cube Browser:  
- (Parent Company, Company...hierarchy), Rank - If the Rank is at the end of the table, Cube Browser doesn't show the Rank column at all, only the heading appears.
- Rank, (Parent Company, Company...hierarchy) - If the Rank is at the start of the table, Cube Browser displays correctly.

In Excel,
- (Parent Company, Company...hierarchy), Rank - If Rank is at the end of the table, Excel doesn't display the Rank of the Parent Company, but does display the


View Complete Post


More Related Resource Links

SSAS - How to get other members from dimension that has Parent Child hierarchy?

  
I have a Sales Territory dimension that has employee and parent employee attribute on which parent child hierarchy is defined and it gives below hierarchy while browsing - - Mark Rolls --- Lumin Jacs ----- Larry Gomes ------- Messica Owens ------- Tom Ted ----------- Jackson Lopez ----- Matthew Ron --- Fred jacob - Jason Ron --- Jecy Pedro   But beside this parent-child hierarchy I have other attributes like employee address, email and telephone. My facts related sales transaction is tagged to lowest level. For example here facts are available only for Jackson Lopez (being Field Executive). When use below query I get complete sales reporting hierarchy result with some measures like sales amount, sales volume. But while accesing other attributes like address or email, it's repeating address/email/telephone of jackson Lopes everywhere to whom fact record is linked, Actually I want address/email/telephone of each sales employee from that dimension within hierarchy. How do I get it? The query I used is: Here Parent Terr ID is parent child hierachy. SELECT ( Descendants( { [Dim SalesRegion].[Parent Terr ID].[Employee Level 01].&[538018] /* here Mark Rolls is 538018 */ }, 0,AFTER), NONEMPTY([Dim SalesRegion].[Emp Address].[Emp Address].Members), NONEMPTY([Dim SalesRegion].[Emp Email].[Emp Email].Members) ) ON ROWS , { ([Dim Date].[The Year].[The Year].[CY-2010], [Dim

Parent-Child, Unbalanced Hierarchy and unexpected Root behaviour

  
I have a chart accounts that contains an account key and parent account key (like the AW Enterprise sample). Each account ultimately has either Assets or Liabilities as parent. However, There also some accounts appear in the root because they have less levels then the other accounts. to put in other words: the acounts with exactly four levels, ultimately show up with either assets or liabilities in the root but the members with less then four levels, also appear in the root instead of under Assets or Liabilities. Where am I going wrong? The dimension settings appear to be exactly the same as the AdventureWorks-sample.

Parent child hierarchy & MDX to fetch particular level & all members below it along with measures us

  
I have a Sales Territory dimension that has employee and parent employee attribute on which parent child hierarchy is defined and it gives below hierarchy while browsing - - Mark Rolls --- Lumin Jacs ----- Larry Gomes ------- Messica Owens ------- Tom Ted ----------- Jackson Lopez ----- Matthew Ron --- Fred jacob - Jason Ron --- Jecy Pedro   But beside this parent-child hierarchy I have other attributes like employee address, email and telephone. My facts related sales transaction is tagged to lowest level. For example here facts are available only for Jackson Lopez (being Field Executive). When use below query I get complete sales reporting hierarchy result with some measures like sales amount, sales volume. But while accesing other attributes like address or email, it's repeating address/email/telephone of jackson Lopes everywhere to whom fact record is linked, Actually I want address/email/telephone of each sales employee from that dimension within hierarchy. How do I get it? The query I used is: Here Parent Terr ID is parent child hierachy. SELECT ( Descendants( { [Dim SalesRegion].[Parent Terr ID].[Employee Level 01].&[538018] /* here Mark Rolls is 538018 */ }, 0,AFTER), NONEMPTY([Dim SalesRegion].[Emp Address].[Emp Address].Members), NONEMPTY([Dim SalesRegion].[Emp Email].[Emp Email].Members) ) ON ROWS , { ([Dim Date].[The Year].[The Year].[CY-2010], [Dim

Poor Performing Parent Child Hierarchy

  
Q1:  Is my dimension and measures designed properly for scd 2 changes in the dimension? Q2:  If using a parent-child hierarchy is an acceptable approach, why would my query perform so poorly against my customer dimension?  I have developed a customer dimension with scd 2.  Within in the dimension I have two surrogate keys: corporate customer key and customer key and the source system ID: customer ID.  I use the corporate customer key to group or relate fuzzy matched customer records (based on other customer attributes) and to group or relate the scd 2 changes.   CustomerCorpKey CustomerID CustomerKey GeographyKey CreateTimeStamp ExpireTimeStamp 21 28 21 27937 29:18.8 22:14.0 21 28 473359 27937 22:14.0 NULL Now my fact table has the customer corp key, customer id, and customer key. DateKey FullDateAlternateKey CustomerCorpKey CustomerKey CustomerID Some Measure 20100913 9/13/2010 21 21 28 $500 If you notice, the customer dimension has undergone a change.  The new customer key is not in the fact table, but I want to keep the historical changes of the customer dimension, but I can no longer link the fact to the customer dimension unless I use the customer corp key and customer key combination.  I thought I could use a parent-child dimension on the customer corp key and customer key attributes

How to show primary key of Parent-Child hierarchy

  
I have dimesion with ragged Parent-Child hierarchy. For instance organizational structure of a company. Commonly the hierarchy shows names of hierarchy items but now I need to create MDX query where result on axis 1 will be ID (primary key of dimesion) of item and name of item, but main is to show id.

SELECT {} ON 0,
{[Product].[MetaGroupHierarchy].children} ON 1
FROM MyOLAPCube

With mentioned MDX query the result is :

name1
name2
name3
...

And I would like to have:
ID1, name1
ID2, name2
ID3, name3

or

ID1
ID2
ID3


I do not know how to construct MDX query in this case.  Because main dimesion key has to have NameColumn property set to field with name of item.

Reload of Parent-Child-Hierarchy

  

Hi,

I have a problem with the parent-child-hierarchy after page reload.

Wie use SSAS 2005 and SSRS 2005 with newest service packs and patches. The parent-child-hierarchy works in the reports excellently. But we have a hierarchy with 9 levels. If the users expand some levels and thereafter change the filter or sort the columns, will be the page reloaded and whole hierarchy is collapsed again.

Can you suggest a solution for this problem. Is the problem solved in SSRS 2008?


Security permission for a key attribute which belongs to a parent-child hierarchy.

  

Hello,

I have a dimension with a parent-child hierarchy on the key attribute and another attribute for the parent. I also want to declare a role with a permission to view only a specific member of that dimension, but it doesn't let me define a restriction on the key attribute and says I must define the equivalent restriction on the parent attribute. The problem is that I don't know how to accomplish that because I must use a specific value, so I can't restrict it using this value's parent or children. I might be stupid, but I really have no idea how to do it...

Thanks.


SSRS 2008 R2 - Parent Child Hierarchy - Searchable Parameter List

  

Hi dear,

I'm, workin at the moment on a report for my company. I have a problem with searching in a parameter list which is based upon a parent child hierarchy. The users asked me for type in the first few characters to search the parameter faster (like in this post ) , because it's a large hierarchy with about 1700 values. In a "normal" list ("linear" without  a hierarchy) this feature is available.

So my question:

Isn't it possible to search in the parameter list in general if this is based upon a hierarchy?

Are there any possibilities or suggestions to get this feature?

Or is this the only way to do this:

http://romiller.com/2008/07/29/searchable-dependant-parameters-in-ssrs/

 

Thanks in advance!

Sigfrid-R


parent-child and Hierarchy

  

This is my present structure - I appreciate feedback

factTable

EmployeeId(FK)
SalesAmt

Employee
EmployeeId(PK)
Name
Description

EmployeeHierarchy
EmpChildId(FK to EmployeeId)
EmpParentId(FK to EmployeeId)

(If EmployeeId of Employee Table is connected on EmpChildId of EmployeeHierarchy table, that means we want all EmpParentId's
and vice versa
If EmployeeId of Employee Table is connected on EmpParentId of EmployeeHierarchy table, that means we want all EmpChildId's)

I need a list of all employees with Employeeid, name and description, so I created a EmployeeDimension - I can use order, filter(working good)

I needed a list of all parents with their employeeid, name and description for this employeeId so I created a ParentDimension and I did a join on EmpParentId=EmployeeId to get employeeId, name and description from Employee table, later on I filter on EmpChildId to get parents for specific EmployeeId

Similary I created a ChildDimension also

Everything is working so far

----------------------

Now the problem arised that I want to show all Employees with their name, description, id who are parents of x EmployeeId and child of y EmployeeId

I have three seperate dimensions

facts, EmployeeDimension, EmpParentsDimension, EmpChildrenDi

Descendants in Parent/Child hierarchy

  

Hi,

my parent/child dimension has the following structure:

structur is as follows:

- TOP Level

·      A

o    a

§    

GridView Parent Child View with JQuery Effects

  
I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

How to keep the hover for Parent menu and set the selected menu item css for child menu item?

  

Hi,

I'm using cssfriendly control adapter for menu. My asp.net menu control's datasource is a sitemap file I'm using which contains all the urls.

I have the following questions:

  1. Is there a way to keep the parent menu item hovered while hovering over the respective child menu items?
  2. Is there a way to keep the child menu item selected? I am able to set the css for the parent menu, however I was wondering if the same is possible with the child items.

Please help! Smile

Thanks,

Moneka Smile



way of calling "javascript function of parent window from child window."

  
The article way of calling "javascript function of parent window from child window." was added by raja.s on Sunday, June 06, 2010.

Hi,Here i am going to explain how to call the javascript function of a parent window from the child window(pop-Up).Some may know before reading this post.Parent Java Script Function:script language="Javascript" type="text/javascript">

Two modalpopups as a parent-child

  

When I  open two modalpopups, one over another, there is unexpected order.

After click on "Open Parent Panel", and click on "Open Child Panel",

Child Panel (newone) is under the Parent. 


Uploaded with ImageShack.us

What should I do to get it in "normal order"?

The code is:

    <asp:ScriptManager ID="A" runat="Server">
    </asp:ScriptManager>
    <asp:Button id="Z1"  runat="server" Text="Open Parent Panel" 

Display a nested child ListView on PostBack while using DataPager on parent ListView

  

Hello ASP.NET community,

I am having trouble finding how to solve the following issue :

I am using nested listviews to display Sales and Sales details.

The main ListView displays General Information about Sales and the child ListView displays the detailed information about one sale. the child listview is shown only when the user clicks on a link (see included code, DataBind is made on PageLoad) :

ASPX Markup Code :

<asp:listview id="lvSales" runat="server" onitemdatabound="lvSales_ItemDataBound">
<layouttemplate>
<table cellspacing="0" border="1" width="250" style="border-collapse:collapse;">
<tr runat="server" id="headerRow">
<th scope="col" style="width:30px;"></th>
<th scope="col">SaleNumber</th>
</tr>
<tr id="itemPlaceHolder" runat="server" enableviewstate="true"/>
</table>
</layouttemplate>
<itemtemplate>
<tr id="row" runat="server">
<td style="text-align:center;"><asp:button id="btnShowHideDetails" runat="server" oncommand=&qu
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend