title: Calculate Date Difference in Power BI with multiple tables joined
body: <p>I'm trying to calculate the difference between 2 dates in Power Bi. I need to join 3 separate tables in order to get the correct data back. Here is my Dax(Measure) code</p>
  
  <pre><code>Average Decision Time = CALCULATE(
  DATEDIFF(Enquiries_venues[RecordCreated],EnquiryStatusVersion[RecordCreated], DAY),
  FILTER ( Enquiries, Enquiries[TestEnquiry] = 0 &amp;&amp; (Enquiries[EnquiryStatusId] = 45 || Enquiries[EnquiryStatusId] = 50 || Enquiries[EnquiryStatusId] = 55 || Enquiries[EnquiryStatusId] = 56 || Enquiries[EnquiryStatusId] = 60)),
  FILTER ( Enquiries_Venues, Enquiries_Venues[EnquiryVenueProposalId] = 60),
  FILTER ( EnquiryStatusVersion, EnquiryStatusVersion[EnquiryStatusId] = 45)
  </code></pre>
  
  <p>)</p>
  
  <p>However the date-diff part is not able to recognize the tables at this point. When I put this section at the bottom it also doesn't work as the calculate function requires the expression to come first.</p>
  
  <p>Here is the error message 
  <a href="https://i.stack.imgur.com/lbDds.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lbDds.png" alt="enter image description here"></a></p>
  
  <p>Any Help would be greatly appreciated. </p>