<?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: calculate Turn-around-time based on two column values in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-Turn-around-time-based-on-two-column-values/m-p/2773348#M86429</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="364794" data-lia-user-login="SBC" class="lia-mention lia-mention-user"&gt;SBC&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to attached sample file with the solution&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Duration = 
VAR Period = DATEDIFF ( 'Table'[InDate], 'Table'[OutDate], SECOND )
VAR Days = QUOTIENT ( Period, 86400 )
VAR Hours = QUOTIENT ( Period, 3600 ) - Days * 24
VAR Minutes = QUOTIENT ( Period, 60 ) - Days * 1440 - Hours * 60
VAR Seconds = Period - Days * 86400 - Hours * 3600 - Minutes * 60
RETURN
    Days &amp;amp; " days : " &amp;amp; Hours &amp;amp; " hrs : " &amp;amp; Minutes &amp;amp; " mins : " &amp;amp; Seconds &amp;amp; " secs"&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 16 Sep 2022 11:31:26 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-09-16T11:31:26Z</dc:date>
    <item>
      <title>calculate Turn-around-time based on two column values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-Turn-around-time-based-on-two-column-values/m-p/2772538#M86362</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to calculate the duration of date and time in one column in power bi.&amp;nbsp;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;base on indate and outdate column, duration column&amp;nbsp; need to&amp;nbsp; be calculated.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;SBC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 07:02:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-Turn-around-time-based-on-two-column-values/m-p/2772538#M86362</guid>
      <dc:creator>SBC</dc:creator>
      <dc:date>2022-09-16T07:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Turn-around-time based on two column values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-Turn-around-time-based-on-two-column-values/m-p/2772588#M86368</link>
      <description>&lt;P&gt;You can easily do this in Power Query, which is the most suitable for this kind of task. Create a custom columns and insert the following formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Duration.TotalMinutes([InDat]-[outDate])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;EDIT: You can then use this other formula to obtain the hours format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=Number.From([Duration_Column])*24&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you asked for this in DAX, I feel like I should also point out how to help you with DAX. Power Query remains the best tool, but in case here is what you can use with DAX:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DATEDIFF ( Table[inDat], Table[outDate], SECOND )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will give you the duration in seconds, you can pick other parameters as you prefer, of course.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 07:22:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-Turn-around-time-based-on-two-column-values/m-p/2772588#M86368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-16T07:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Turn-around-time based on two column values</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-Turn-around-time-based-on-two-column-values/m-p/2773348#M86429</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="364794" data-lia-user-login="SBC" class="lia-mention lia-mention-user"&gt;SBC&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to attached sample file with the solution&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Duration = 
VAR Period = DATEDIFF ( 'Table'[InDate], 'Table'[OutDate], SECOND )
VAR Days = QUOTIENT ( Period, 86400 )
VAR Hours = QUOTIENT ( Period, 3600 ) - Days * 24
VAR Minutes = QUOTIENT ( Period, 60 ) - Days * 1440 - Hours * 60
VAR Seconds = Period - Days * 86400 - Hours * 3600 - Minutes * 60
RETURN
    Days &amp;amp; " days : " &amp;amp; Hours &amp;amp; " hrs : " &amp;amp; Minutes &amp;amp; " mins : " &amp;amp; Seconds &amp;amp; " secs"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 16 Sep 2022 11:31:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-Turn-around-time-based-on-two-column-values/m-p/2773348#M86429</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-16T11:31:26Z</dc:date>
    </item>
  </channel>
</rss>

