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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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