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
Ashish9201
Helper I
Helper I

Inactive Relationship

Hi All,

 

I have below tables which has active and inactive relationship assigned, Highlighted Relation is an inactive relationship between dim date and timeentry start date. I am doing a comparison between Forecasted hours(From table bookable resource) and Actual Hours(From table Timeentry) here.

Ashish9201_0-1661248157012.png

 

Below is the result which i am getting currently while visualizing data in table. I am getting correct value in forecasted table since this has active relation with dim date table, however i am not getting correct value for actual hours since the table relation is not active.

Have tried using this formula to get actual hours worked : 

Actual Hours Worked = CALCULATE(SUM(msdyn_timeentry[Duration (Hours)]),USERELATIONSHIP(msdyn_timeentry[Start],'Dim Date'[Date])). Can someone help me on this?

Ashish9201_1-1661248342706.png

 

Regards,

Ashish Gupta

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Ashish9201 , Many to Many bi- directional indexes are creating loops, so relationships are not valid and inactive. Please correct the model using bridge tables 

 

https://www.seerinteractive.com/blog/join-many-many-power-bi/

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solutio...

View solution in original post

2 REPLIES 2
Ashish9201
Helper I
Helper I

Hi @amitchandak ,

 

Let me explain the relationship of tables here, hope this can help you in resolving my difficulty

Ashish9201_1-1661250184317.png

 

1 relation is inactive between "Dates" Many to many (table 1 and 2)

2 relation is inactive between "Projects" Many to many (table 1 and 2)

3 relation is active between "Resources" Many to many (table 1 and 2)

4 relation is active between "Dates" Many to one (table 2 and 3)

5 relation is inactive between "Dates" Many to one (table 1 and 3)

amitchandak
Super User
Super User

@Ashish9201 , Many to Many bi- directional indexes are creating loops, so relationships are not valid and inactive. Please correct the model using bridge tables 

 

https://www.seerinteractive.com/blog/join-many-many-power-bi/

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solutio...

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.