<?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: Duration of failure over 2 rows - records in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2996717#M101005</link>
    <description>&lt;P&gt;Thanks you Jewel.&amp;nbsp;&lt;BR /&gt;This is the view i was looking for.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jan 2023 11:58:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-02T11:58:06Z</dc:date>
    <item>
      <title>Duration of failure over 2 rows - records</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2982010#M99981</link>
      <description>&lt;P&gt;Hy,&lt;BR /&gt;&lt;BR /&gt;I got a blackbox file with on a record the failure start datetimestamp (TRUE) en on a other record de failure end datetimestamp.(FALSE). De first failure has a duration of 3 seconds.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;How can i calculate the duration for each&amp;nbsp;failure on the locations (Locatie) ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 14:12:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2982010#M99981</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-21T14:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Duration of failure over 2 rows - records</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2982709#M100018</link>
      <description>&lt;P&gt;You can try to create a table with DAX like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CalculatedTable =&lt;BR /&gt;SUMMARIZE (&lt;BR /&gt;'Table',&lt;BR /&gt;'Table'[Location],&lt;BR /&gt;"Duration",&lt;BR /&gt;MINUTE (&lt;BR /&gt;CALCULATE ( MAX ( 'Table'[Timestamp] ), 'Table'[Failure] = FALSE () )&lt;BR /&gt;- CALCULATE ( MIN ( 'Table'[Timestamp] ), 'Table'[Failure] = TRUE () )&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jewel&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 20:39:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2982709#M100018</guid>
      <dc:creator>jewel_at</dc:creator>
      <dc:date>2022-12-21T20:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Duration of failure over 2 rows - records</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2984095#M100093</link>
      <description>&lt;P&gt;Thank you, I have a summarize per location.&lt;/P&gt;&lt;P&gt;I only changed the Minute in Seconds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;René&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 11:45:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2984095#M100093</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-22T11:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Duration of failure over 2 rows - records</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2985817#M100199</link>
      <description>&lt;P&gt;Thank you,&lt;BR /&gt;Is it also prissible to summarixe per date ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards René&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 06:55:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2985817#M100199</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-23T06:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Duration of failure over 2 rows - records</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2986904#M100272</link>
      <description>&lt;P&gt;Sure! try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;SUMMARIZE (
    ADDCOLUMNS('Table', "Date", LEFT(CONVERT('Table'[Timestamp],STRING),10)),
    'Table'[Location],[Date],
    "Duration",
    DATEDIFF(CALCULATE ( MAX ( 'Table'[Timestamp] ), 'Table'[Failure] = TRUE()  )
                , CALCULATE ( MIN ( 'Table'[Timestamp] ), 'Table'[Failure] = FALSE() ), SECOND)

)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed the duration calculation to use DATEDIFF function instead, in case you're expecting the failure to last longer than a minute.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need to format that, there's a good article that talks about it here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Aggregating-Duration-Time/ba-p/22486" target="_blank" rel="noopener"&gt;Aggregating Duration/Time - Microsoft Power BI Community&lt;/A&gt;&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;&lt;P&gt;Jewel&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 16:36:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2986904#M100272</guid>
      <dc:creator>jewel_at</dc:creator>
      <dc:date>2022-12-23T16:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Duration of failure over 2 rows - records</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2996717#M101005</link>
      <description>&lt;P&gt;Thanks you Jewel.&amp;nbsp;&lt;BR /&gt;This is the view i was looking for.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 11:58:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-of-failure-over-2-rows-records/m-p/2996717#M101005</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-02T11:58:06Z</dc:date>
    </item>
  </channel>
</rss>

