To enable the "View Hierarchy" button in the top ribbon bar, you need to adjust a setting in the N:1 relationship between your entity and the entity with which you want the relationship. Generally you are going to be creating a hierarchy when you create a parent-child relationship in the current entity. So to enable the view, go to System > Customizations and open the Solution where that entity exists. Go to the N:1 relationships and the find the relationship between the entity and itself. Edit that relationship - in the top section there will be a "Hierarchy" option with Yes or No - it will be set to No by default. Change that to Yes, then republish the entity and solution and you'll start to see the hierarchy option in the ribbon bar.