<?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: Bug using NETWORKDAYS in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/3238218#M119080</link>
    <description>&lt;P&gt;I was thinking about this and the psuedo logic would be along these lines, but not sure how to code it in DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Start Date and End Date are both NOT on a weekend use NetworkDays&lt;BR /&gt;If Start Date AND End Date are both on a weekend use DateDiff&lt;BR /&gt;If Start Date is on a weekend and End Date is not on a weekend use DateDiff&lt;BR /&gt;If Start Date is NOT on a weekend and End Date IS on a weekend use DateDiff&lt;/P&gt;</description>
    <pubDate>Tue, 16 May 2023 15:25:21 GMT</pubDate>
    <dc:creator>EaglesTony</dc:creator>
    <dc:date>2023-05-16T15:25:21Z</dc:date>
    <item>
      <title>Bug using NETWORKDAYS</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/3238190#M119078</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am trying to get the difference between a Start and End Date to complete an item, excluding weekends.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I have a Start Date of 10/23/2021 and End Date of 10/24/2021, this should be 1 day. I also have a Start Date of 11/12/2022 and End Date of 11/12/2022, this should be 0 day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I have:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DaysToCompleteExcludeWeekends = &lt;/SPAN&gt;&lt;SPAN&gt;NETWORKDAYS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;TimeInStatus[StartDate]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;TimeInStatus[EndDate]&lt;/SPAN&gt;&lt;SPAN&gt;) - &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; However for the first example it is giving me -1 for both examples above.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 15:18:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/3238190#M119078</guid>
      <dc:creator>EaglesTony</dc:creator>
      <dc:date>2023-05-16T15:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Bug using NETWORKDAYS</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/3238218#M119080</link>
      <description>&lt;P&gt;I was thinking about this and the psuedo logic would be along these lines, but not sure how to code it in DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Start Date and End Date are both NOT on a weekend use NetworkDays&lt;BR /&gt;If Start Date AND End Date are both on a weekend use DateDiff&lt;BR /&gt;If Start Date is on a weekend and End Date is not on a weekend use DateDiff&lt;BR /&gt;If Start Date is NOT on a weekend and End Date IS on a weekend use DateDiff&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 15:25:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/3238218#M119080</guid>
      <dc:creator>EaglesTony</dc:creator>
      <dc:date>2023-05-16T15:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Bug using NETWORKDAYS</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/3241293#M119263</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="541485" data-lia-user-login="EaglesTony" class="lia-mention lia-mention-user"&gt;EaglesTony&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;In the case of the formula, the hidden &amp;lt;weekend&amp;gt; parameter is the default, and the formula determines that Saturday and Sunday will not be calculated.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/networkdays-dax" target="_blank" rel="noopener"&gt;NETWORKDAYS function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;For the first record, the start date is Saturday and the end date is Sunday. There is a one day difference between these two dates, but this day is on Sunday, so it will not be counted, so it returns 0, then subtracts 1 to return -1.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Also for the second record, the difference between the two dates is 0 days, so it returns 0, and then subtracts 1 to return -1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;Best Regards,&lt;BR /&gt;Gao&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Community Support Team&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="#008080"&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="#008080"&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;&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 on it, please feel free to let us know.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#008080"&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;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2" 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;&amp;nbsp;&lt;/SPAN&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 02:05:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/3241293#M119263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-18T02:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Bug using NETWORKDAYS</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/4289146#M170230</link>
      <description>&lt;P&gt;It seems that Networkdays has a bug. I have included holidays table to skip those days as well.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 14:57:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/4289146#M170230</guid>
      <dc:creator>DT5577</dc:creator>
      <dc:date>2024-11-18T14:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Bug using NETWORKDAYS</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/4289156#M170231</link>
      <description>&lt;P&gt;Did this work? I do not think the Networkdays works as intended. Please advise.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 15:04:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Bug-using-NETWORKDAYS/m-p/4289156#M170231</guid>
      <dc:creator>DT5577</dc:creator>
      <dc:date>2024-11-18T15:04:26Z</dc:date>
    </item>
  </channel>
</rss>

