<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic DATEDIFF Cross table with many to one table relationship in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-Cross-table-with-many-to-one-table-relationship/m-p/766611#M3483</link>
    <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can you assist i am trying to subtract two dates from two different tables which have a many to one relationship&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using RELATE but i think cause of the one to many relation that does not work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically trying to subtract the min date for each account by all the dates for that account to get the days&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;days&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2019 14:45:52 GMT</pubDate>
    <dc:creator>kdaya</dc:creator>
    <dc:date>2019-08-14T14:45:52Z</dc:date>
    <item>
      <title>DATEDIFF Cross table with many to one table relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-Cross-table-with-many-to-one-table-relationship/m-p/766611#M3483</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please can you assist i am trying to subtract two dates from two different tables which have a many to one relationship&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using RELATE but i think cause of the one to many relation that does not work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically trying to subtract the min date for each account by all the dates for that account to get the days&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;days&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 14:45:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-Cross-table-with-many-to-one-table-relationship/m-p/766611#M3483</guid>
      <dc:creator>kdaya</dc:creator>
      <dc:date>2019-08-14T14:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: DATEDIFF Cross table with many to one table relationship</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-Cross-table-with-many-to-one-table-relationship/m-p/766793#M3491</link>
      <description>&lt;PRE&gt;-- If you have a 1:many rel between
-- min_date and requests, then this
-- will work

[Days Since First Date] = -- calculated column in requests
var __thisDate = requests[Created Time]
var __firstDate = RELATED( min_date[First Date] )
return
	__thisDate - __firstDate&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note that such calculations should be performed in Power Query, not in DAX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Darek&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 18:05:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-Cross-table-with-many-to-one-table-relationship/m-p/766793#M3491</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-14T18:05:28Z</dc:date>
    </item>
  </channel>
</rss>

