Forum Discussion

BryMan_17's avatar
BryMan_17
Regular Visitor
1 year ago
Solved

Filtering across multiple columns, best practices? Many-to-Many or 1-to-Many (dim)

I have a case for something where either many-to-many or a 1-to-many relationship seems like my only options and am seeking advice on best practices and which to use: My example is user-manager assi...
  • ray_aramburo's avatar
    1 year ago

    One to many is the better idea, here's another recommendation: if you have a User ID, ensure to have it on the Assignments/Claims table and then relate the Users ID single table containing all the hierarchy with it. That way you'll be able to filter the Claims table by the L3 Manager from your Users Catalog/Hierarchy. 

  • BryMan_17's avatar
    BryMan_17
    1 year ago

    Thank you for the reply.  The one-to-many approach seems like the better approach for some cases, as long as the many table does not become too large.

     

    If I am following correctly, I believe that your alternative would require having filters for each level of manager.  Is that correct?

     

    I did find a 3rd alternative, which I decided to use: using the HierarchySlicer custom visual along with a key on a ragged hierarchy chart.  Here are some links on it.  I was able to keep a proper star schema with this option:

    Removing Blanks from Organizational Ragged Hierarchy in Power BI Matrix Visual - RADACAD

    Parsing Organizational Hierarchy or Chart of Accounts in Power BI with Parent-child Functions in DAX - RADACAD