Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AXinter
Frequent Visitor

Need help: Ambiguity between tables in singe direction model

Hi all,

 

I've been exploring the possiblility of shifting our standard star schema model to more of a "starflake" model, where we use our dimCompany table as an outrigger table to filter our other dimension tables (such as dimPart or dimCustomer) since Company is a common field in all of our dimension tables. Thus, by filtering on a specific company using dimCompany in our PBI report, the rows in dimPart and dimCustomer would filter to the chosen company and in turn filter out our Sales Order fact table. 

However, with this setup, it doesn't seem possible to have two active relationships between the "sub"-dim tables (dimPart and dimCustomer) and the fctSalesOrder (see an example below):

AXinter_0-1660816507465.png

 

Question 1)
Why is this an ambigious relationship when I have singe directional relationship in the model?

Question 2) 
Could you provide an example or practical case illustrating how this might cause an issue in this model?

Question 3)
Am I required to use DAX to create a relationship between fctSalesOrder and DimPart (and all my other dimension tables)? What can I do?


I've looked at other examples here in the community and watched some YouTube videos about ambiguity but can't find a good solution to the problem.

Any help would be much appreciated!


 





1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @AXinter ,

 

Question 1) and Question 2) should be one question.

 

As far as I know, Power BI does't support us to create two active relationships between two tabels.

According to Power BI warning, we know that if we create a relationship between the 'DimPart' and the 'fctSalesOrder', Power BI will get confused on the filter between 'DimCompany' and 'fctSalesOrder'.

RicoZhou_0-1661158326593.png

From above screenshot, we can find that if the relationship between 'DimPart' and 'fctSalesOrder' is active, 'DimCompany' could filter 'fctSalesOrder' by two ways.

'DimCompany'>'dimCustomer'>'fctSalesOrder'

'DimCompany'>'DimPart''>'fctSalesOrder'

So you couldn't create active relationships between 'DimPart'/'DimCustomer' with 'fctSalesOrder' at the same time.

 

Question 3)

I suggest you to try USERELATIONSHIP() function to use inactive relationship.

Measure = 
calculate(sum('fctSalesOrder'[value]),userelationship('DimPart'[column],'fctSalesOrder'[column]))

 

Best Regards,
Rico Zhou

 

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

 

 

 

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @AXinter ,

 

Question 1) and Question 2) should be one question.

 

As far as I know, Power BI does't support us to create two active relationships between two tabels.

According to Power BI warning, we know that if we create a relationship between the 'DimPart' and the 'fctSalesOrder', Power BI will get confused on the filter between 'DimCompany' and 'fctSalesOrder'.

RicoZhou_0-1661158326593.png

From above screenshot, we can find that if the relationship between 'DimPart' and 'fctSalesOrder' is active, 'DimCompany' could filter 'fctSalesOrder' by two ways.

'DimCompany'>'dimCustomer'>'fctSalesOrder'

'DimCompany'>'DimPart''>'fctSalesOrder'

So you couldn't create active relationships between 'DimPart'/'DimCustomer' with 'fctSalesOrder' at the same time.

 

Question 3)

I suggest you to try USERELATIONSHIP() function to use inactive relationship.

Measure = 
calculate(sum('fctSalesOrder'[value]),userelationship('DimPart'[column],'fctSalesOrder'[column]))

 

Best Regards,
Rico Zhou

 

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

 

 

 

amitchandak
Super User
Super User

@AXinter , You have two paths to reach from the company to fact order. That is causing an issue.

 

Ideally company should join with Fact order.

 

In case you want to filter the slicer customer and item you create measure and use that as visual level filter

 

M1= countrows(filter(customer, Customer[Company] in values(company[Company]) ))

 

 

M2= countrows(filter(item, item[Company] in values(company[Company]) ))

 

Use the above measures in the respective slicers and check for not blank

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.