<?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: Power BI Hour Difference between two different rows from different column with a condition in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Hour-Difference-between-two-different-rows-from/m-p/3715925#M144634</link>
    <description>&lt;P&gt;Hi Greg, this is the entire table. The Hour Duration is the expected Output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Type&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;3&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;2&lt;BR /&gt;3&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Start&lt;BR /&gt;22-01-2020 18:59&lt;BR /&gt;20-01-2020 09:34&lt;BR /&gt;20-01-2020 09:34&lt;BR /&gt;21-01-2020 09:33&lt;BR /&gt;23-01-2020 11:38&lt;BR /&gt;23-01-2020 13:38&lt;BR /&gt;22-05-2020 17:38&lt;BR /&gt;23-05-2020 13:38&lt;BR /&gt;24-05-2020 17:38&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;End&lt;BR /&gt;22-01-2020 19:59&lt;BR /&gt;20-01-2020 10:34&lt;BR /&gt;20-01-2020 09:34&lt;BR /&gt;21-01-2020 10:33&lt;BR /&gt;23-01-2020 11:39&lt;BR /&gt;23-01-2020 15:38&lt;BR /&gt;22-05-2020 18:38&lt;BR /&gt;23-05-2020 15:38&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hours Duration&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01:00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01:06&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01:00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;These texts are Column wise.&lt;/DIV&gt;</description>
    <pubDate>Thu, 22 Feb 2024 05:12:22 GMT</pubDate>
    <dc:creator>sushmitasur4</dc:creator>
    <dc:date>2024-02-22T05:12:22Z</dc:date>
    <item>
      <title>Power BI Hour Difference between two different rows from different column with a condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Hour-Difference-between-two-different-rows-from/m-p/3714609#M144561</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So I am working with Live Data. I need a POWER BI Query to create a calculated column or Measure.&lt;/P&gt;&lt;P&gt;What I really want is the Sum of Hours between (Start time when type = 3) and (End time when type = 3)&lt;/P&gt;&lt;P&gt;Basically, It starts when type = 3 and records the start time. The counter Goes on until type goes back to type = 2 and records the previous row and records the End time and then calculates the Duration between them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Hour Duration column is my desired Output.&lt;/P&gt;&lt;P&gt;Output Explanation:&lt;/P&gt;&lt;P&gt;I subtract the end time&amp;nbsp;23-01-2020 11:39 with the start time of previous row&amp;nbsp;21-01-2020 09:33.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 14:57:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Hour-Difference-between-two-different-rows-from/m-p/3714609#M144561</guid>
      <dc:creator>sushmitasur4</dc:creator>
      <dc:date>2024-02-21T14:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Hour Difference between two different rows from different column with a condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Hour-Difference-between-two-different-rows-from/m-p/3714617#M144562</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="694011" data-lia-user-login="sushmitasur4" class="lia-mention lia-mention-user"&gt;sushmitasur4&lt;/a&gt;&amp;nbsp;This is a variation on Previous Row. See my article on Mean Time Between Failure (MTBF) which uses EARLIER: &lt;A href="http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586" target="_blank" rel="noopener"&gt;http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586&lt;/A&gt;.&lt;BR /&gt;The basic pattern is:&lt;BR /&gt;Column =&amp;nbsp;&lt;BR /&gt;&amp;nbsp; VAR __Current = [Value]&lt;BR /&gt;&amp;nbsp; VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] &amp;lt; EARLIER('Table'[Date])),[Date])&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])&lt;BR /&gt;RETURN&lt;BR /&gt;&amp;nbsp; __Current - __Previous&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tough to say, but you might also need Cthulhu.&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Cthulhu/m-p/509739#M211" target="_blank" rel="noopener"&gt;Cthulhu - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post your data as text and provide the expected output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or maybe it's simple and you can just do this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = SUMX( FILTER( 'Table', [Type] = 3 ), [End] - [Start] )&lt;/LI-CODE&gt;
&lt;P&gt;Then convert to seconds and use Chelsie Eiden's Duration?&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389" target="_blank"&gt;Chelsie Eiden's Duration - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 15:02:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Hour-Difference-between-two-different-rows-from/m-p/3714617#M144562</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-02-21T15:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Hour Difference between two different rows from different column with a condition</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Hour-Difference-between-two-different-rows-from/m-p/3715925#M144634</link>
      <description>&lt;P&gt;Hi Greg, this is the entire table. The Hour Duration is the expected Output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Type&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;3&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;2&lt;BR /&gt;3&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Start&lt;BR /&gt;22-01-2020 18:59&lt;BR /&gt;20-01-2020 09:34&lt;BR /&gt;20-01-2020 09:34&lt;BR /&gt;21-01-2020 09:33&lt;BR /&gt;23-01-2020 11:38&lt;BR /&gt;23-01-2020 13:38&lt;BR /&gt;22-05-2020 17:38&lt;BR /&gt;23-05-2020 13:38&lt;BR /&gt;24-05-2020 17:38&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;End&lt;BR /&gt;22-01-2020 19:59&lt;BR /&gt;20-01-2020 10:34&lt;BR /&gt;20-01-2020 09:34&lt;BR /&gt;21-01-2020 10:33&lt;BR /&gt;23-01-2020 11:39&lt;BR /&gt;23-01-2020 15:38&lt;BR /&gt;22-05-2020 18:38&lt;BR /&gt;23-05-2020 15:38&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hours Duration&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01:00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01:06&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;01:00&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;These texts are Column wise.&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Feb 2024 05:12:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Hour-Difference-between-two-different-rows-from/m-p/3715925#M144634</guid>
      <dc:creator>sushmitasur4</dc:creator>
      <dc:date>2024-02-22T05:12:22Z</dc:date>
    </item>
  </channel>
</rss>

