Forum Discussion
Org chart without 'parent id', only a field 'manager'
Adescrit I followed steps 1,2 & 3, and then created Index_Parent = LOOKUPVALUE(Table[Index_child], Table[Employee_name], Table[Manager_name] )
After this used a visulaization from market place to create the visuals. This worked !!
4 Replies
- Adescrit
Impactful Individual
Hi shettysunith
In Power Query you could create a Parent id and child id to enable you to use one of the org chart visuals. The steps would be:
- Open Power Query.
- With the Org Data table selected, go to Add Column > Index Column > From 1.
- Rename the index column "Child Id" (you can name it whatever you want but let's go with Child id for simplicity)
- In the Org Data table, right click on the Manager field and select Add as New Query.
- From the Transform menu select "Remove Duplicates" and then Convert "To Table". Rename the table "Managers".
- In the new table (containing manager names) go to Add Column > Index Column > From 1.
- Rename this new index column as "Parent Id"
- Select the Org Data table. Select Merge queries, and merge the Org Data and the Managers table via the manager name. The join kind can be Left Outer.
- Click on the outward facing arrow icon in the top-right of the new column (containing the word "Table" repeatedly)
- Expand only the Parent Id column.
- Close & Apply power query.
- You can now create a relationship between the Managers table and the Org Data table via the "Parent Id" column.
Will this now allow you to create an org chart?
- shettysunithFrequent Visitor
Adescrit I followed steps 1,2 & 3, and then created Index_Parent = LOOKUPVALUE(Table[Index_child], Table[Employee_name], Table[Manager_name] )
After this used a visulaization from market place to create the visuals. This worked !!
- shettysunithFrequent Visitor
Adescrit Index that we created in step3 should be unique right ? Because in the step 7 we create again index for managers, where as managers also also there in step 3 where they already have an index and hence these index will be different. So when we merge it will not create the proper parent child relation rather some cyclic relationships.
- AnonymousNot applicable
Hi shettysunith ,
You could check the details below:
And here's a test file you could refer to.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.