<?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: Trying to work out duration with date time columns and another with minutes in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3580791#M138117</link>
    <description>&lt;P&gt;Thansk for the repsonse. I'm getting a eof error when trying to add. Do you think this could be related to the data types? I've tried duplicating the start and end columns and confirming date/time. That didnt help. The travel time column is formated as decimal number. There will be a lot of zeros in this data.&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2023 00:46:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-12-13T00:46:10Z</dc:date>
    <item>
      <title>Trying to work out duration with date time columns and another with minutes</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3569492#M137620</link>
      <description>&lt;P&gt;Hi there all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to work out a total hours and minutes duration between a start time, end time and then add a to the duration. How can I do this in power bi desktop? (I only need the end calculation of the total time in hours and minutes).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 00:42:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3569492#M137620</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-06T00:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to work out duration with date time columns and another with minutes</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3569773#M137631</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;In Power BI, we have DateDiff function to calculate the difference between dates in various intervals such as Hour, Minutes, etc.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So, you can use below expression to calculate difference in Hours,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(RoasterTable[Roaster Start Time],RoasterTable[Roaster End Time],HOUR)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;If you want to calculate difference in Hours and minutes, then create a custom column with below expression,&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Duration = &lt;/SPAN&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(RoasterTable[Roaster Start Time],RoasterTable[Roaster End Time],HOUR) &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;" Hour "&lt;/SPAN&gt;&lt;SPAN&gt; &amp;nbsp;&amp;amp;&lt;/SPAN&gt;&lt;SPAN&gt;MOD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(RoasterTable[Roaster Start Time],RoasterTable[Roaster End Time],MINUTE),&lt;/SPAN&gt;&lt;SPAN&gt;60&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;" Minutes"&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Please refer to the below screenshot ,&lt;/DIV&gt;
&lt;DIV&gt;&lt;BR /&gt;&lt;img /&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Inogic Professional Service Division&lt;/P&gt;
&lt;P&gt;An expert technical extension for your techno-functional business needs&lt;/P&gt;
&lt;P&gt;Power Platform/Dynamics 365 CRM&lt;/P&gt;
&lt;P&gt;Drop an email at &lt;A href="mailto:crm@inogic.com" target="_blank"&gt;crm@inogic.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Service:&amp;nbsp; &lt;A href="http://www.inogic.com/services/" target="_blank"&gt;http://www.inogic.com/services/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power Platform/Dynamics 365 CRM Tips and Tricks:&amp;nbsp; &lt;A href="http://www.inogic.com/blog/" target="_blank"&gt;http://www.inogic.com/blog/&lt;/A&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Dec 2023 05:22:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3569773#M137631</guid>
      <dc:creator>SamInogic</dc:creator>
      <dc:date>2023-12-06T05:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to work out duration with date time columns and another with minutes</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3573646#M137773</link>
      <description>&lt;P&gt;Thanks SamInogic for that information. Sorry I wasnt clear in my questions. What I was really saying was I would like the final column to contain both the duration and the added travel time for the shift as well. The format would be hours and minutes.&amp;nbsp; So in the eg above, it would be 1.30 minutes duration + the travel time, so all up 1.45 minutes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Metoo&amp;nbsp;&lt;/P&gt;&lt;P&gt;ps: if you need to know using power bi desktop.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 02:32:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3573646#M137773</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-08T02:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to work out duration with date time columns and another with minutes</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3579450#M138041</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can create a calculated column as below to get it:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
VAR _Seconds =
    (
        DATEDIFF ( 'Table'[RosterStartTime], 'Table'[RosterEndTime], MINUTE ) + 'Table'[TravelTimeFinal]
    ) * 60
VAR _Minutes =
    INT ( DIVIDE ( _Seconds, 60 ) )
VAR _RemainingSeconds =
    MOD ( _Seconds, 60 )
VAR _Hours =
    INT ( DIVIDE ( _Minutes, 60 ) )
VAR _RemainingMinutes =
    MOD ( _Minutes, 60 )
RETURN
    FORMAT ( _Hours, "00" ) &amp;amp; ":"
        &amp;amp; FORMAT ( _RemainingMinutes, "00" ) &amp;amp; ":"
        &amp;amp; FORMAT ( _RemainingSeconds, "00" )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 10:01:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3579450#M138041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-12T10:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to work out duration with date time columns and another with minutes</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3580791#M138117</link>
      <description>&lt;P&gt;Thansk for the repsonse. I'm getting a eof error when trying to add. Do you think this could be related to the data types? I've tried duplicating the start and end columns and confirming date/time. That didnt help. The travel time column is formated as decimal number. There will be a lot of zeros in this data.&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 00:46:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3580791#M138117</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-13T00:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to work out duration with date time columns and another with minutes</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3581067#M138130</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your screenshot, it seems that you are trying to create a custom column in Power Query Editor. Please create a &lt;A href="https://learn.microsoft.com/en-us/training/modules/dax-power-bi-add-calculated-tables/2-calculated-columns" target="_self"&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;calculated column&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/A&gt; by DAX instead of creating a custom column.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Power-Query-Custom-Column-vs-Calculated-Column-Performance/m-p/392813" target="_blank"&gt;Solved: Power Query Custom Column vs. Calculated Column: P... - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://devoworx.net/custom-column-vs-calculated-column-power-bi/" target="_blank"&gt;Power BI: Custom Column Vs Calculated Column | Power BI&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 04:40:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3581067#M138130</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-13T04:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to work out duration with date time columns and another with minutes</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3581134#M138133</link>
      <description>&lt;P&gt;Thank you very much, calculated beautifully.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry one final question, how can this number be summed?&amp;nbsp; (using a slicer to work out the fortnight). Matching the total hour+ travel time against another column called minimum hours.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 06:09:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trying-to-work-out-duration-with-date-time-columns-and-another/m-p/3581134#M138133</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-13T06:09:31Z</dc:date>
    </item>
  </channel>
</rss>

