Forum Discussion

Sandybanks's avatar
Sandybanks
New Member
2 years ago

Representing hierarchical nested categories

Please help...

I have a simple Excel sheet which lists category names in one column and the corresponding parent category in a separate column.

Every category of course needs to be listed at least in the first column. However, it may also be listed multiple times in the parent category column to indicate corresponding child categories. 

This data will represent a hierarchy where each category can have multiple levels of child hierarchies.

It may look like this:

Parent HierarchyHierarchy

Fruits

Apples
FruitsBananas
MeatsPork
MeatsBeef
BeefHam
BeefSteak
ApplesGolden Delicious

 

How can I make a visual tree-like representation of the data?

4 Replies

  • Uzi2019's avatar
    Uzi2019
    Icon for Community Champion rankCommunity Champion

    Hi Sandybanks 
    You can do this by using Matrix visual.

     

    you can see above image.
    Just disabled the stepped layout property

     

     

    I hope I answered your question!

  • Uzi2019 thanks for your fast reply.

    While this will show the first level of hierarchy, it seems to me, it does not let me "drill down" through the levels as I'd hoped for.

    In your screenshot "Meat" is listed in the same level as "Beef". I'm looking for some representation where "Beef" - together with its children "Ham" and "Steak" - is listed only as child of "Meat".

    Similar to the folder tree where a folder can have folders and subfolders.

    Or am I simply missing a setting in the visual?

    • Uzi2019's avatar
      Uzi2019
      Icon for Community Champion rankCommunity Champion

      Hi Sandybanks 
      It means you have three hierarchy levels.
      you have properly mapped it against meat>beef>> ham, steak

       

      You have to categoriz it properly. I have modified your data like added new column as sub category.

      You have to follow the same rule if you want proper sub Hierarchy.

       

      I hope I answered your question!

       

      • Sandybanks's avatar
        Sandybanks
        New Member

        Uzi2019 that's exactly my problem.

        My example date with apples and meat, of course, is just sample data. My real life data is much longer and I have categories which are nested multiple times. So, categories with sub-categories and sub-categories and so on.

        The problem I have is, that I can't simply "restructure" my data. However, I'd like to visualize this parent-child logic in a way that I can see it as tree or something similar.

        And I wonder if I can do this in PowerBI.