SherlockSpreadsheets
SherlockSpreadsheets

Reputation: 2370

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

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.

Screenshots below show sample data, 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.

Table Relations

+------------------------------------------------------------------------------------------+----------------+-----------------+---------------+-----------+
| Relation   (From : To)                                                                   | CrossFiltering | FromCardinality | ToCardinality | IsActive  |
+------------------------------------------------------------------------------------------+----------------+-----------------+---------------+-----------+
| [gopherMeterId].[factSummaryTicket]     ==> : <==    [bisonMeterId].[dimCustomerMeter]   | OneDirection   | Many            | One           | TRUE      |
+------------------------------------------------------------------------------------------+----------------+-----------------+---------------+-----------+
| [CustBillTierKey].[factSummaryTicket]   ==> : <==    [CustTierKey].[dimBillTierCustomer] | OneDirection   | Many            | One           | TRUE      |
+------------------------------------------------------------------------------------------+----------------+-----------------+---------------+-----------+
| [eticketOperatorId].[dimCustomerMeter]  ==> : <==    [eticketOperatorId].[dimCustomers]  | OneDirection   | Many            | One           | **FALSE** |
+------------------------------------------------------------------------------------------+----------------+-----------------+---------------+-----------+
| [CustKey].[dimBillTierCustomer]         ==> : <==    [eticketOperatorId].[dimCustomers]  | OneDirection   | Many            | One           | TRUE      |
+------------------------------------------------------------------------------------------+----------------+-----------------+---------------+-----------+

Sample Data

enter image description here

Table Diagram

enter image description here

Upvotes: 0

Views: 1176

Answers (1)

SherlockSpreadsheets
SherlockSpreadsheets

Reputation: 2370

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

enter image description here

Upvotes: 0

Related Questions