<?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: Calculating weekly overtime in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2402011#M62927</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="344436" data-lia-user-login="abeirne" class="lia-mention lia-mention-user"&gt;abeirne&lt;/a&gt; , Try a measure like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;new column = datediff('Employee_Time'[Clock in Date], 'Employee_Time'[Clock Out Date],second)/3600.0&lt;/P&gt;
&lt;P&gt;new measure = sumx(addcolumns(summarize(Table, Table[Emp], Table[Week num], "_1", sum(Table[New column])), [_2], if([_1]&amp;gt;40, [_1]-40,blank())),[_2])&lt;/P&gt;</description>
    <pubDate>Fri, 18 Mar 2022 01:10:12 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-03-18T01:10:12Z</dc:date>
    <item>
      <title>Calculating weekly overtime</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2401984#M62926</link>
      <description>&lt;P&gt;Hi I am looking to calculate over time for a group of employees. I have my hours worked, a caluclated column which is&lt;BR /&gt;DIVIDE((('Employee_Time'[Clock Out Date] - 'Employee_Time'[Clock in Date] * 1,440) , 60 ).&lt;BR /&gt;I have tried some measures and calculated columns using&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;IF(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; [Hours Worked ] &amp;gt; 40,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - 40,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;But this does not work. I just need to know the correct formula for an ot calculation. I feel like it should be filtered by pay period or payroll date, but I am not sure how to do that.&amp;nbsp; I have a Payroll Date&amp;nbsp; with columns [Date] , [pay period], and [weekday]. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 01:02:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2401984#M62926</guid>
      <dc:creator>abeirne</dc:creator>
      <dc:date>2022-03-18T01:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weekly overtime</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2402011#M62927</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="344436" data-lia-user-login="abeirne" class="lia-mention lia-mention-user"&gt;abeirne&lt;/a&gt; , Try a measure like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;new column = datediff('Employee_Time'[Clock in Date], 'Employee_Time'[Clock Out Date],second)/3600.0&lt;/P&gt;
&lt;P&gt;new measure = sumx(addcolumns(summarize(Table, Table[Emp], Table[Week num], "_1", sum(Table[New column])), [_2], if([_1]&amp;gt;40, [_1]-40,blank())),[_2])&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 01:10:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2402011#M62927</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-03-18T01:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weekly overtime</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2411031#M63510</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="344436" data-lia-user-login="abeirne" class="lia-mention lia-mention-user"&gt;abeirne&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you resolved the issue? If yes, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from the thread. If not, please&amp;nbsp;consider sharing more details about it. And it would be great if there was a sample file without any sensitive information here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Best Regards,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team_Gao&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;If there is any post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3" color="#FF0000"&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT size="3"&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Thanks a lot!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to get your questions answered quickly&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;--&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;How to provide sample data&lt;/SPAN&gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 03:33:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2411031#M63510</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-23T03:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weekly overtime</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2418526#M63940</link>
      <description>&lt;P&gt;The column is a lot easier, thank you. Would you be able to explain the measure for me a little more? I don't understand the _2 part.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 17:22:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2418526#M63940</guid>
      <dc:creator>abeirne</dc:creator>
      <dc:date>2022-03-25T17:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weekly overtime</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2418548#M63944</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I don't understand what the [_2] is supposed to be? Thanks&lt;BR /&gt;&lt;BR /&gt;Measure = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;SUMX(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-120px"&gt;&lt;SPAN&gt;'dds Employee_Time_Tb'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Payroll Date'[Week Num]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"_1"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'dds Employee_Time_Tb'[Hours Worked 2]&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;[_2]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;[_1]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;40&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;[_1]&lt;/SPAN&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;SPAN&gt;40&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-90px"&gt;&lt;SPAN&gt;BLANK&lt;/SPAN&gt;&lt;SPAN&gt;())),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;[_2]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="lia-indent-padding-left-60px"&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Mar 2022 17:33:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculating-weekly-overtime/m-p/2418548#M63944</guid>
      <dc:creator>abeirne</dc:creator>
      <dc:date>2022-03-25T17:33:02Z</dc:date>
    </item>
  </channel>
</rss>

