<?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 hours between two date/time columns and exclude weekends in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672911#M142499</link>
    <description>&lt;P&gt;Thanks! Great way to solve it.&lt;BR /&gt;I used this formula:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Custom =&lt;/SPAN&gt; &lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'MyTable'&lt;/SPAN&gt;&lt;SPAN&gt;[Start date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'MyTable'&lt;/SPAN&gt;&lt;SPAN&gt;[End date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;HOUR&lt;/SPAN&gt;&lt;SPAN&gt;) - &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALENDAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'MyTable'&lt;/SPAN&gt;&lt;SPAN&gt;[Start date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'MyTable'&lt;/SPAN&gt;&lt;SPAN&gt;[End date]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;WEEKDAY&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;6&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;} )) * &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;24&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2024 12:25:03 GMT</pubDate>
    <dc:creator>NDRS</dc:creator>
    <dc:date>2024-02-01T12:25:03Z</dc:date>
    <item>
      <title>Calculate hours between two date/time columns and exclude weekends</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672365#M142466</link>
      <description>&lt;P&gt;Hi all, first post here so be nice since im a beginner.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Im trying to caculate the hours between two columns including start date/time and end date/time and I want to exlude the weekends. I have been looking but many questions is about calculate business hours but that's not the case for me.&lt;BR /&gt;&lt;BR /&gt;Can you guys please help a newbie out? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 08:07:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672365#M142466</guid>
      <dc:creator>NDRS</dc:creator>
      <dc:date>2024-02-01T08:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two date/time columns and exclude weekends</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672478#M142470</link>
      <description>&lt;P&gt;You can identify whether a date is weekday or weekend bbbby below aspect :&lt;/P&gt;&lt;PRE&gt;if(WEEKDAY([Date],2)&amp;gt;=6,"Weekend","Weekday")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And you can use DATEDIFF to identify the diff in hours between 2 dates:&lt;/P&gt;&lt;P&gt;&lt;A href="https://datascientest.com/en/mastering-power-bi-datediff-effortlessly-calculate-time-intervals#:~:text=The%20DAX%20DATEDIFF%20function%20calculates,DATEDIFF%20(%2C%20%2C%20)%E2%80%9D" target="_blank" rel="noopener"&gt;https://datascientest.com/en/mastering-power-bi-datediff-effortlessly-calculate-time-intervals#:~:text=The%20DAX%20DATEDIFF%20function%20calculates,DATEDIFF%20(%2C%20%2C%20)%E2%80%9D&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you also plz state what you mean by exclude weekends&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 08:51:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672478#M142470</guid>
      <dc:creator>NandanHegde</dc:creator>
      <dc:date>2024-02-01T08:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two date/time columns and exclude weekends</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672505#M142473</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;Each row is basicly a ticket with a start and end-date/time (Opened and solved) and I want to calculate the number of hours it takes so solve every ticket. And by weekend I mean I want to exclude the hours from saturday and sunday since we are not measured in the SLA on the weekends.&amp;nbsp; Make this more sense now?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im familiar with the DATEDIFF formula but if a ticket is opened on a friday and solved on a monday, it will include the hours from the weekend and I don't want it to include the hours from the weekend.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 09:03:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672505#M142473</guid>
      <dc:creator>NDRS</dc:creator>
      <dc:date>2024-02-01T09:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two date/time columns and exclude weekends</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672836#M142494</link>
      <description>&lt;P&gt;you can identify the number of weekends between the 2 dates via the below thread :&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Desktop/Calculate-number-of-weekends-Fridays-and-Saturdays-between-two/m-p/2751396#M957936" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/Calculate-number-of-weekends-Fridays-and-Saturdays-between-two/m-p/2751396#M957936&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And via datediff get the hours count between the 2 dates and substract the hours based on number of weekends * 24&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 11:40:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672836#M142494</guid>
      <dc:creator>NandanHegde</dc:creator>
      <dc:date>2024-02-01T11:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate hours between two date/time columns and exclude weekends</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672911#M142499</link>
      <description>&lt;P&gt;Thanks! Great way to solve it.&lt;BR /&gt;I used this formula:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Custom =&lt;/SPAN&gt; &lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'MyTable'&lt;/SPAN&gt;&lt;SPAN&gt;[Start date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'MyTable'&lt;/SPAN&gt;&lt;SPAN&gt;[End date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;HOUR&lt;/SPAN&gt;&lt;SPAN&gt;) - &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALENDAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'MyTable'&lt;/SPAN&gt;&lt;SPAN&gt;[Start date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'MyTable'&lt;/SPAN&gt;&lt;SPAN&gt;[End date]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;WEEKDAY&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;6&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;} )) * &lt;/SPAN&gt;&lt;SPAN&gt;&lt;SPAN&gt;24&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 12:25:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-hours-between-two-date-time-columns-and-exclude/m-p/3672911#M142499</guid>
      <dc:creator>NDRS</dc:creator>
      <dc:date>2024-02-01T12:25:03Z</dc:date>
    </item>
  </channel>
</rss>

