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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vha_labo
Frequent Visitor

Using DATEDIFF Between 2 Tables with an Inactive Relationship

Hello,
Attempting to create a column in table 02_referrals that calculates the difference between two dates from two tables with an inactive relationship.   Image notes the relationships I've got currently.

relationship.jpg

 

Ultimately, trying to do the equivalent of:

m_DateDiff_0102 = DATEDIFF('01_consults'[date01_consult_created], '02_referrals'[date02_referral_created], DAY) 

 

RELATED doesn't work due to the inactive relationship.  I was looking into using USERELATIONSHIP, but not sure if this is the right track or not (or how to do it, if correct).

 

Any thoughts on how to accomplish would be appreciated. Thanks.

1 ACCEPTED SOLUTION
kentyler
Solution Sage
Solution Sage

have you looked at LOOKUPVALUE()





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

To have a date diff between two tables. You either need to copy the date from one table to another or you can create a measure that needs to have some group level.

Refer to this : https://www.dropbox.com/s/y47ah38sr157l7t/Oder_delivery.pbix?dl=0

 

There are four ways you can do it.

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Anonymous
Not applicable

I have used the "Way 2" formulas here and they work perfectly!  

 

Sean

 

kentyler
Solution Sage
Solution Sage

have you looked at LOOKUPVALUE()





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Simple solution that appears to have done the trick.  Thanks.

please share the solution. I have a similar problem and cannot solve it. thanks!

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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