<?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 Calculate Time Duration with DirectQuery powerBI in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Calculate-Time-Duration-with-DirectQuery-powerBI/m-p/3037699#M40862</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I`m trying to calculate the duration between creationDate and closedDate. I read multiple sources regarding the same issue, but couldn`t find any concrete solution.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sunamyagupta_0-1674477156222.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/860059i6B3D0B04A3BEDB01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sunamyagupta_0-1674477156222.png" alt="sunamyagupta_0-1674477156222.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here, I`m looking at two things -&lt;BR /&gt;1. Calculate the duration like - 3d 14hr 2m 4s&lt;/P&gt;&lt;P&gt;2. Then calculate the average duration based on certain criteria like ID, etc.&lt;BR /&gt;&lt;BR /&gt;In the query editor, I tried calculating the value using [closedDate]-[creationDate] and was able to populate the data-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sunamyagupta_1-1674477458017.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/860061iE0321B6DF3889717/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sunamyagupta_1-1674477458017.png" alt="sunamyagupta_1-1674477458017.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the format is text and I can't change it to duration because I`m constantly getting an error message that it is not supported in DirectQuery-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sunamyagupta_2-1674477535081.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/860062i1F1B80182102400B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sunamyagupta_2-1674477535081.png" alt="sunamyagupta_2-1674477535081.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Getting the same error when I`m trying to transform the column values into Duration.Days/Duration.hours/Duration.minutes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please guide me on how to resolve the issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 12:41:37 GMT</pubDate>
    <dc:creator>sunamyagupta</dc:creator>
    <dc:date>2023-01-23T12:41:37Z</dc:date>
    <item>
      <title>Calculate Time Duration with DirectQuery powerBI</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Calculate-Time-Duration-with-DirectQuery-powerBI/m-p/3037699#M40862</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I`m trying to calculate the duration between creationDate and closedDate. I read multiple sources regarding the same issue, but couldn`t find any concrete solution.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sunamyagupta_0-1674477156222.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/860059i6B3D0B04A3BEDB01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sunamyagupta_0-1674477156222.png" alt="sunamyagupta_0-1674477156222.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here, I`m looking at two things -&lt;BR /&gt;1. Calculate the duration like - 3d 14hr 2m 4s&lt;/P&gt;&lt;P&gt;2. Then calculate the average duration based on certain criteria like ID, etc.&lt;BR /&gt;&lt;BR /&gt;In the query editor, I tried calculating the value using [closedDate]-[creationDate] and was able to populate the data-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sunamyagupta_1-1674477458017.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/860061iE0321B6DF3889717/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sunamyagupta_1-1674477458017.png" alt="sunamyagupta_1-1674477458017.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the format is text and I can't change it to duration because I`m constantly getting an error message that it is not supported in DirectQuery-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sunamyagupta_2-1674477535081.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/860062i1F1B80182102400B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sunamyagupta_2-1674477535081.png" alt="sunamyagupta_2-1674477535081.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Getting the same error when I`m trying to transform the column values into Duration.Days/Duration.hours/Duration.minutes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please guide me on how to resolve the issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 12:41:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Calculate-Time-Duration-with-DirectQuery-powerBI/m-p/3037699#M40862</guid>
      <dc:creator>sunamyagupta</dc:creator>
      <dc:date>2023-01-23T12:41:37Z</dc:date>
    </item>
  </channel>
</rss>

