Forum Discussion

SweetyPBI's avatar
SweetyPBI
New Member
7 months ago

Multi hierarchical modeling

Power BI data modeling question – multiple deep account hierarchies

 

I’m looking for the best data-modeling approach in Power BI for the following scenario.

 

I have a DimAccount table that contains 5 separate hierarchies, each with ~15 levels, stored in a flattened format:

 

  • Hier1Level0 … Hier1Level15
  • Hier2Level0 … Hier2Level15
  • Hier5Level0 … Hier5Level15

 

 

My Fact table is very large (~1 billion rows) and contains an AccountKey as a foreign key (along with ~10 other dimension keys).

 

Requirement

 

  • I need to display all hierarchies together:
    • In a single slicer
    • And in a single matrix visual
  •  
  • Without using field parameters

 

 

Approaches I’ve considered & issues

 

  1. Unpivot / normalize hierarchies (horizontal → vertical)
    • This duplicates AccountKey in the dimension.
    • Results in a many-to-many relationship with the fact.
    • Requires a bridge table with bi-directional filtering.
    • Breaks the clean star schema, and I’m concerned about performance and model complexity given the fact size.
  2.  
  3. Split each hierarchy into separate role-playing dimensions
    • Maintains a star schema.
    • However, I cannot combine all hierarchies into:
      • One slicer
      • Or one matrix visual
    •  
  4.  

 

 

Question

What is the best-practice modeling approach for this scenario that:

 

  • Scales well with a very large fact table
  • Allows all hierarchies to be used together in slicers and matrix visuals
  • Avoids field parameters
  • Minimizes many-to-many relationships and bi-directional filters where possible

 

 

Any guidance or recommended patterns would be greatly appreciated.

4 Replies

  • AllisonKennedy's avatar
    AllisonKennedy
    Community Champion

    can you share some sample data in a pasted table we can easily copy into a pbix? I'm having trouble visualizing what your different hierarchies are and how they interact with each other and with a single account. If you can put names to it so my brain can process I may have a light bulb moment 🙂 or maybe it will inspire others.

     

    In terms of the many : many problem, would you be able to concatenate the hierarchies with the account key to create a unique ID for the unpivoted accounts? 

     

    Multiple dim tables (one for each hierarchy) will stop you from putting all in a single slicer, but you should still be able to combine into a single matrix visual provided you also have something from the fact table in there - does that help any?

  • Hi SweetyPBI 

     

    Can you please share sample data of records of tables. Also the exact requirement logic and what should be the output you are looking for.

  • v-hjannapu's avatar
    v-hjannapu
    Community Support

    Hi SweetyPBI,
    Thank you for posting your query in Microsoft Fabric Community Forum. Also, thanks to krishnakanth240AllisonKennedy   for those inputs on this thread. 

     Please provide sample data that covers your issue or question completely, in a usable format not as a screenshot.
    Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
    Please show the expected outcome based on the sample data you provided.
    How to provide sample data in the Power BI Forum - Microsoft Fabric Community

    Regards,
    Community Support Team.

    • v-hjannapu's avatar
      v-hjannapu
      Community Support

      Hi SweetyPBI.,

      Just checking in to see if you had a chance to follow up on our earlier conversation. If you're still encountering the issue, please share the sample data so we can assist you with an accurate solution.

      If you have any further questions, feel free to reach out anytime.

      Regards,
      Community Support Team.