<?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: Number of Workdays per Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Number-of-Workdays-per-Month/m-p/4110061#M163119</link>
    <description>&lt;P&gt;There is no need to calculate this in Power BI. This data is immutable.&amp;nbsp; Use an external reference table where you precomputed that stuff once.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Aug 2024 01:14:46 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-08-21T01:14:46Z</dc:date>
    <item>
      <title>Number of Workdays per Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Number-of-Workdays-per-Month/m-p/4109933#M163113</link>
      <description>&lt;P&gt;I need to calculate the number of work days per month for some margin and revenue data.&lt;BR /&gt;&lt;BR /&gt;Essentially the invoice date I am using should only include work days, no holidays or weekends.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What formula can I use that would return the number of distinct invoice dates per month?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 23:14:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Number-of-Workdays-per-Month/m-p/4109933#M163113</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-20T23:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Number of Workdays per Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Number-of-Workdays-per-Month/m-p/4110061#M163119</link>
      <description>&lt;P&gt;There is no need to calculate this in Power BI. This data is immutable.&amp;nbsp; Use an external reference table where you precomputed that stuff once.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 01:14:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Number-of-Workdays-per-Month/m-p/4110061#M163119</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-21T01:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Number of Workdays per Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Number-of-Workdays-per-Month/m-p/4116870#M163434</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&amp;nbsp;try two measures below, and if you encounter any issues, let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Workdays = 
CALCULATE(
    COUNTROWS('InvoiceTable'),
    FILTER(
        'InvoiceTable',
        WEEKDAY('InvoiceTable'[InvoiceDate],2) &amp;lt;= 5 &amp;amp;&amp;amp; 
        NOT('InvoiceTable'[InvoiceDate] IN VALUES('HolidayTable'[HolidayDate]))
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Distinct Workdays per Month = 
CALCULATE(
    DISTINCTCOUNT('InvoiceTable'[InvoiceDate]),
    FILTER(
        'InvoiceTable',
        WEEKDAY('InvoiceTable'[InvoiceDate],2) &amp;lt;= 5 &amp;amp;&amp;amp; 
        NOT('InvoiceTable'[InvoiceDate] IN VALUES('HolidayTable'[HolidayDate]))
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P align="center"&gt;&lt;FONT face="verdana,geneva"&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Did I answer your question?&amp;nbsp;&lt;/STRONG&gt; &lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;If so, please mark my post as the solution!&lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;&lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Your Kudos are much appreciated!&amp;nbsp;&lt;/STRONG&gt; &lt;FONT color="#99CC00"&gt;&lt;STRONG&gt;Proud to be a Responsive Resident!&lt;/STRONG&gt;&lt;/FONT&gt; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2024 14:51:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Number-of-Workdays-per-Month/m-p/4116870#M163434</guid>
      <dc:creator>ahadkarimi</dc:creator>
      <dc:date>2024-08-24T14:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Number of Workdays per Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Number-of-Workdays-per-Month/m-p/4117681#M163471</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;If you want to return the working days of the month (excluding weekends and holidays) please see this test.&lt;BR /&gt;In my scenario:&lt;/P&gt;
&lt;P&gt;My Table:&lt;/P&gt;
&lt;P&gt;Table = CALENDAR(DATE(2024,1,1),TODAY())&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;workdays =&lt;/P&gt;
&lt;P&gt;VAR _start = DATE(YEAR(MAX([Date])), MONTH(MAX([Date])), 1)&lt;/P&gt;
&lt;P&gt;VAR _last = EOMONTH(_start, 0)&lt;/P&gt;
&lt;P&gt;RETURN&lt;/P&gt;
&lt;P&gt;NETWORKDAYS(_start, _last, 1, {DATE(2024, 1, 1), DATE(2024, 12, 31)})&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I set the weekend to Saturday and Sunday, which is represented as 1 in the NETWORKDAYS function.&lt;/P&gt;
&lt;P&gt;For more details, you can read related document link:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fdax%2Fnetworkdays-function-dax&amp;amp;data=05%7C02%7Cv-yetonggu%40microsoft.com%7C13caa27a748f42a201ab08dcc57c687a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638602385334234801%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&amp;amp;sdata=2DZ3Q%2B7kHXmrPlgq69nmWDdw4Bq%2BszkwcI2vdvYELeU%3D&amp;amp;reserved=0" target="_blank"&gt;NETWORKDAYS function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Sunshine Gu&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 03:17:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Number-of-Workdays-per-Month/m-p/4117681#M163471</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-26T03:17:37Z</dc:date>
    </item>
  </channel>
</rss>

