cancel
Showing results for 
Search instead for 
Did you mean: 
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

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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors