<?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 Re: Find the difference between earliest and latest datetime in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Find-the-difference-between-earliest-and-latest-datetime/m-p/2320827#M34226</link>
    <description>&lt;P&gt;([Latest DateTime]-[Earliest DateTime])*1440&lt;/P&gt;</description>
    <pubDate>Sat, 05 Feb 2022 00:59:25 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2022-02-05T00:59:25Z</dc:date>
    <item>
      <title>Find the difference between earliest and latest datetime</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Find-the-difference-between-earliest-and-latest-datetime/m-p/2317598#M34202</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table which holds data for every part that is produced. When a part is produced, it has a date time stamp (see below):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rebrow31_1-1643889096265.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/664655i03DBCE76421A49C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rebrow31_1-1643889096265.png" alt="rebrow31_1-1643889096265.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have then easily created a visual which shows me the earliest and latest time a part was produced, see below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rebrow31_2-1643889174928.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/664656iE9072EA23C1743EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rebrow31_2-1643889174928.png" alt="rebrow31_2-1643889174928.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I calculate the minutes between the earliest and latest shot datetime?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 11:54:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Find-the-difference-between-earliest-and-latest-datetime/m-p/2317598#M34202</guid>
      <dc:creator>rebrow31</dc:creator>
      <dc:date>2022-02-03T11:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Find the difference between earliest and latest datetime</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Find-the-difference-between-earliest-and-latest-datetime/m-p/2320827#M34226</link>
      <description>&lt;P&gt;([Latest DateTime]-[Earliest DateTime])*1440&lt;/P&gt;</description>
      <pubDate>Sat, 05 Feb 2022 00:59:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Find-the-difference-between-earliest-and-latest-datetime/m-p/2320827#M34226</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-02-05T00:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Find the difference between earliest and latest datetime</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Find-the-difference-between-earliest-and-latest-datetime/m-p/2322485#M34257</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/309166"&gt;@rebrow31&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can try DATEDIFF function in your code.&lt;/P&gt;
&lt;P&gt;Calculated column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
VAR _SECOND = DATEDIFF('Table'[Earliest DateTime],'Table'[Latest DateTime],SECOND)
RETURN
DIVIDE(_SECOND,60)&lt;/LI-CODE&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _Summarize = SUMMARIZE('Table','Table'[Earliest DateTime],'Table'[Latest DateTime],"Minute", DIVIDE(DATEDIFF('Table'[Earliest DateTime],'Table'[Latest DateTime],SECOND),60))
RETURN
SUMX(_Summarize,[Minute])&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 547px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/665879iF7E098D2BFDC985D/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 07:23:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Find-the-difference-between-earliest-and-latest-datetime/m-p/2322485#M34257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-07T07:23:08Z</dc:date>
    </item>
  </channel>
</rss>

