<?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 total hours worked in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-hours-worked/m-p/3681575#M142972</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="637246" data-lia-user-login="RussHaight" class="lia-mention lia-mention-user"&gt;RussHaight&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for providing the solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the problem has been solved, please mark it as solution. if there is still a problem, please point it out and I will answer it for you as soon as possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Feb 2024 01:40:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-02-06T01:40:46Z</dc:date>
    <item>
      <title>Calculate total hours worked</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-hours-worked/m-p/3680618#M142927</link>
      <description>&lt;P&gt;This is from SQL backend.I have table named Punch. It has 1 field named TotalTimeHHMM in type text. I want to sum/add the TotalTimeHHMM. The values are in this format. 10:19 which reperesents 10 hours 19 minutes. This field also has leading 0's. an example would be 02:57 which represents 2 hours 57 minutes. I do not want to breakout in days, just hours and minutes. An example would be this-18:30 + 15.45 + 12.11 which would equal adding the hours of 18+15+12 for 45 and adding the minutes of 30+45+11 which would equal 86 minutes or 1 hour 26 minutes for a grand total of 46 hours and 26 minutes -45 hours + 1 hour 26 minutes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 15:23:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-hours-worked/m-p/3680618#M142927</guid>
      <dc:creator>RussHaight</dc:creator>
      <dc:date>2024-02-05T15:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate total hours worked</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-hours-worked/m-p/3681176#M142955</link>
      <description>&lt;P&gt;I figured it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of using the TotalTime column which was a conversion fromTotalMinutes column, I just used TotalMinutes column. Example as follows&lt;/P&gt;&lt;P&gt;TotalMinutes 598.8 (decimal) converts to TotalTime 09:59 (text) with 09 being hours and 59 being minutes. I created a new column with the following dax formula&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Total Time =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;TotalMinutes&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'punch'&lt;/SPAN&gt;&lt;SPAN&gt;[Total Minutes]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;QUOTIENT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TotalMinutes&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;60&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;"0"&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;" hours "&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MOD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TotalMinutes&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;60&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;"0"&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;" minutes"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;which gave me an output of 9 hours 59 minutes.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I created a measure using the same dax formula and was able to drop it on a card to get total hours worked in hours/minutes output. I then added 2 slicers, one for location and one for employee.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;There might be a better way of doing this but this is what I did to get it to work.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 05 Feb 2024 20:19:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-hours-worked/m-p/3681176#M142955</guid>
      <dc:creator>RussHaight</dc:creator>
      <dc:date>2024-02-05T20:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate total hours worked</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-hours-worked/m-p/3681575#M142972</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="637246" data-lia-user-login="RussHaight" class="lia-mention lia-mention-user"&gt;RussHaight&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for providing the solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the problem has been solved, please mark it as solution. if there is still a problem, please point it out and I will answer it for you as soon as possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 01:40:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-total-hours-worked/m-p/3681575#M142972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-06T01:40:46Z</dc:date>
    </item>
  </channel>
</rss>

