Forum Discussion

BrianLoftonSS's avatar
BrianLoftonSS
New Member
5 years ago

Power BI data model design relationships - direct active relationship would introduce ambiguity

Can anyone offer some modeling & relationship advise in Power BI?

 

I have two Customer tables at different grains that I am trying to relate to a Customer rollup group (`'dimCustomers'`).

 

The two customers tables (`'dimBillTierCustomer'` and `'dimCustomerMeter'`) are individually related to my fact table (`'factSummaryTicket'`). These two relationships work individually, but I want them to be aware of the relationship they each have to 'dimCustomers', so I can use Customers to filter both tables in the report.

 

When I relate each of them, I get an error message on the second relationship.

 

> You can’t create a direct active relationship between 'dimCustomerMeter' and 'dimCustomers' because that would introduce ambiguity between the tables 'dimCustomers' and 'factSummaryTicket'. To make this relationship active, deactivate or delete one of the relationships between 'dimCustomers' and 'factSummaryTicket' first.

 

Screenshot below shows the table relations and the error message.

 

Bill Tier is for Customer pricing rules. Customer Meter is customer locations hierarchy. Customer should filter both of these tables.

 

How can this be modeled so I have two tables related to facts. And then they have a common rollup? 

 

Sample Data

Sample Data

 

Table Diagram

Table Diagram

8 Replies

  • Get rid of the relationship from dimCustomerMeter to factSummaryTicket. eticketOperatorID in dimCustomerMeter to dimCustomers can then be made, but make it bi-directional if you plan on using anything in dimCustomerMeter as as a filter/slicer.

  • One simple change gave me the functionality I needed. Without having to relate ‘dimCustomerMeter’ and ‘dimBillTierCustomer’. The solution was to enable ‘Bi-Directional’ instead of ‘Single’.

     

    Bi Directional Relationship

     

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

      BrianLoftonSS 

      Do be careful with bi-directional filters on one-to-many relationships. (It can wreak havoc in your expected results). They are generally to be avoided unless you know very well what you are doing and control the way filters propagate around the different tables.

       

      What I would suggest, is to make the customer table a separate Dimension table to both your fact tables with single-to-many relationships.

      There are ways to filter the (what you have now as intemediate dim tables) "customer meter" and "bill tier custom" tables based on the selection made in a separate dim customer table. (for example, by applying a measure as a filter in the slicer).

       

      • Erokor's avatar
        Erokor
        Icon for Resolver II rankResolver II

        Much agreed on this one Paul - I simply noticed a quick win and attributed it as such since Brian was already stating he was using the dim table for slicing.

  • v-lionel-msft's avatar
    v-lionel-msft
    Icon for Community Support rankCommunity Support

    Hi BrianLoftonSS ,

     

    Please try this model.

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

     

  • v-lionel-msft's avatar
    v-lionel-msft
    Icon for Community Support rankCommunity Support

    Hi BrianLoftonSS ,

     

    Has your problem been solved?

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.