<?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: Current Month Run Rate with only business days in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963993#M98843</link>
    <description>&lt;P&gt;Hi&amp;nbsp; Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DAYS_REMAINING_MTD =
var _today=TODAY()
var _ThanksgivingDate=
SELECTCOLUMNS(
    FILTER(ALL('Table'),'Table'[Date]&amp;gt;=DATE(2022,11,24)&amp;amp;&amp;amp;'Table'[Date]&amp;lt;=DATE(2022,11,27)),"Date",[Date])
return
COUNTX(
    FILTER(ALL('Table'),
    AND('Table'[Date] &amp;gt;= DATE(YEAR(_today),11,22) ,'Table'[Date]&amp;lt;=DATE(YEAR(_today),12,21)) &amp;amp;&amp;amp;
    NOT( WEEKDAY('Table'[Date],2) ) in {6,7} &amp;amp;&amp;amp;NOT('Table'[Date]) in _ThanksgivingDate ),[Date])&lt;/LI-CODE&gt;
&lt;P&gt;2. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2022 03:25:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-12-13T03:25:35Z</dc:date>
    <item>
      <title>Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963264#M98791</link>
      <description>&lt;P&gt;I am trying to figure out a way to calculate a run rate based on only business days in a fiscal month.&amp;nbsp; For example our fiscal mnth runs from the 22nd through the 21st.&amp;nbsp; &amp;nbsp;So as an example Fiscal December would exclude weekends plus Thanksgiving and only count business days between November 22 and December 21.&amp;nbsp; The goal would basicaly be to build an automated run rate of units by taking the average daily volume on business days lapsed and extrapoliting to the end of the month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this calc for days remanining in a fiscal month but its not account for business days.&amp;nbsp; &amp;nbsp;Addtionally i'm struggling to get figure out how to dynamically get the number of days passed in the fiscal month&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_DAYS_REMAINING_MTD = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;ref_dte&lt;/SPAN&gt;&lt;SPAN&gt; =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt; () - &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;fiscal_mo_end_dte&lt;/SPAN&gt;&lt;SPAN&gt; =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;DATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;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SPAN&gt;MONTH&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;ref_dte&lt;/SPAN&gt;&lt;SPAN&gt; ) ), &lt;/SPAN&gt;&lt;SPAN&gt;21&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;days_remaining&lt;/SPAN&gt;&lt;SPAN&gt; =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;ref_dte&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;fiscal_mo_end_dte&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;DAY&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;days_remaining&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 12 Dec 2022 18:02:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963264#M98791</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-12T18:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963276#M98793</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you have Holidays table that contains all weekends and holidays then&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;VAR days_remaining =&lt;BR /&gt;COUNTROWS (&lt;BR /&gt;EXCEPT ( CALENDAR ( ref_dte, fiscal_mo_end_dte ), VALUES ( Holidays[Holiday] ) )&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;days_remaining&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 18:24:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963276#M98793</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-12-12T18:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963379#M98795</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;- try use NETWORKDAYS Syntax. Let me know if this works. Thanks&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 19:16:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963379#M98795</guid>
      <dc:creator>Manoj_Nair</dc:creator>
      <dc:date>2022-12-12T19:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963400#M98797</link>
      <description>&lt;P&gt;Thanks...how would that bake into my original Dax formula?&amp;nbsp; Basically the idea would be to automatically roll it over month to month...&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 19:35:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963400#M98797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-12T19:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963411#M98798</link>
      <description>&lt;P&gt;Also did you create a table with holidays and weekends?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 19:40:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963411#M98798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-12T19:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963422#M98801</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;yes we created a holiday list, for weekend we used 1 assuming your week ends are Sat and Sun. You can change this depends on your weekends in your company. All details are in Microsoft documentation. Many Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 19:45:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963422#M98801</guid>
      <dc:creator>Manoj_Nair</dc:creator>
      <dc:date>2022-12-12T19:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963993#M98843</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DAYS_REMAINING_MTD =
var _today=TODAY()
var _ThanksgivingDate=
SELECTCOLUMNS(
    FILTER(ALL('Table'),'Table'[Date]&amp;gt;=DATE(2022,11,24)&amp;amp;&amp;amp;'Table'[Date]&amp;lt;=DATE(2022,11,27)),"Date",[Date])
return
COUNTX(
    FILTER(ALL('Table'),
    AND('Table'[Date] &amp;gt;= DATE(YEAR(_today),11,22) ,'Table'[Date]&amp;lt;=DATE(YEAR(_today),12,21)) &amp;amp;&amp;amp;
    NOT( WEEKDAY('Table'[Date],2) ) in {6,7} &amp;amp;&amp;amp;NOT('Table'[Date]) in _ThanksgivingDate ),[Date])&lt;/LI-CODE&gt;
&lt;P&gt;2. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 03:25:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2963993#M98843</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-13T03:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2965609#M98962</link>
      <description>&lt;P&gt;Thanks, very helpful!&amp;nbsp; &amp;nbsp;The part I'm not getting is the days passed in a month as opposed to the days remaining...so for example on December 5 I would want to know how many business days passed between the 22nd and 5th and then how many remain which you already covered.&amp;nbsp; &amp;nbsp;I've tried NETWORKDAYS but couldn't get that to work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 14:35:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2965609#M98962</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-13T14:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2965777#M98979</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;What I shared was about a function "Networkdays" which gives you working days between 2 dates. So you have to do it in 2 parts if you pass the dates which have lapsed eg 22-Nov-2022 and Today() you get working days that have passed and if you pass Today() and 21-Dec-2022 you get working days that are remaining. Hope I understood your problem correctly&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 15:36:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2965777#M98979</guid>
      <dc:creator>Manoj_Nair</dc:creator>
      <dc:date>2022-12-13T15:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2965795#M98981</link>
      <description>&lt;P&gt;Thanks...what I meant is I'm getting an error that NETWORKDAYS is not valid function&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 15:42:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2965795#M98981</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-13T15:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month Run Rate with only business days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2965891#M98987</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;Ohh, you have to update your Power BI desktop version to latest (I think July 2022 onwards this became available)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 16:14:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Month-Run-Rate-with-only-business-days/m-p/2965891#M98987</guid>
      <dc:creator>Manoj_Nair</dc:creator>
      <dc:date>2022-12-13T16:14:05Z</dc:date>
    </item>
  </channel>
</rss>

