<?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: date/time difference between 2 columns if they have the same reference in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060634#M105741</link>
    <description>&lt;P&gt;Thank you it worked!&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 15:41:02 GMT</pubDate>
    <dc:creator>AI14</dc:creator>
    <dc:date>2023-02-03T15:41:02Z</dc:date>
    <item>
      <title>date/time difference between 2 columns if they have the same reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060508#M105729</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to calculate the number of HH:MM between 2 columns - both have the same reference however the inbound has 1 and outbound has 0 and same reg too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bound&amp;nbsp; &amp;nbsp; Reg&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Ref&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ABC&amp;nbsp; &amp;nbsp; &amp;nbsp; 03/02/2023 10:00&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;142536&amp;nbsp;&lt;/P&gt;&lt;P&gt;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ABC&amp;nbsp; &amp;nbsp; &amp;nbsp; 03/02/2023 12:30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;142536&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The difference for reg: ABC&amp;nbsp; or Ref 142536 should be 02:30 (HH:MM)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 14:52:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060508#M105729</guid>
      <dc:creator>AI14</dc:creator>
      <dc:date>2023-02-03T14:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: date/time difference between 2 columns if they have the same reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060525#M105732</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474512" data-lia-user-login="AI14" class="lia-mention lia-mention-user"&gt;AI14&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where are you planning to show the result? Are you looking for a measure?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="height: 100px; width: 100%; border-collapse: collapse; border-style: groove; border-color: #0c1c49; background-color: #00675f;" border="0" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15px;"&gt;
&lt;TD width="15.961305925030231%" style="width: 92px; height: 15px;"&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="84.03869407496977%" style="width: 485px; height: 15px; text-align: left;"&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Please accept the solution when done and consider &lt;FONT color="#FF9900"&gt;giving a thumbs up if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FFFFFF"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt; &lt;/FONT&gt;&lt;BR /&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="4.5" color="#FF99CC"&gt;Contact me privately for support with any larger-scale BI needs, tutoring, etc.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 15:00:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060525#M105732</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2023-02-03T15:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: date/time difference between 2 columns if they have the same reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060542#M105734</link>
      <description>&lt;P&gt;to show on a table and a chart&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 15:05:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060542#M105734</guid>
      <dc:creator>AI14</dc:creator>
      <dc:date>2023-02-03T15:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: date/time difference between 2 columns if they have the same reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060593#M105737</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474512" data-lia-user-login="AI14" class="lia-mention lia-mention-user"&gt;AI14&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if i fully get you, supposing your data is like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can plot a table with the ref column and a measure like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Duration = 
VAR _reg = MAX(TableName[Reg])
VAR _time1 =
MAXX(
    FILTER(
        ALL(TableName),
        TableName[Reg] = _reg
    ),
    TableName[Time]
)
VAR _time2 =
MINX(
    FILTER(
        ALL(TableName),
        TableName[Reg] = _reg
    ),
    TableName[Time]
)
RETURN
FORMAT(_time2 - _time1, "h:mm")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 15:24:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060593#M105737</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-02-03T15:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: date/time difference between 2 columns if they have the same reference</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060634#M105741</link>
      <description>&lt;P&gt;Thank you it worked!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 15:41:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/date-time-difference-between-2-columns-if-they-have-the-same/m-p/3060634#M105741</guid>
      <dc:creator>AI14</dc:creator>
      <dc:date>2023-02-03T15:41:02Z</dc:date>
    </item>
  </channel>
</rss>

