<?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: Count working days of running month [Friday is weekend only] &amp;amp; Days elapsed in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2027950#M45387</link>
    <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to get the working days the following measure should help you:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Amount working day =
CALCULATE(
    COUNTROWS( Calendar ),
    Calendar[Day Name]
        IN {
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday"
    }
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;If you need any help please let me know.&lt;/DIV&gt;&lt;DIV&gt;If I answered your question I would be happy if you could mark my post as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; and give it a thumbs up &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Best regards&lt;/DIV&gt;&lt;DIV&gt;Denis&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Blog: &lt;A title="Click here!" href="https://whatthefact.bi/?utm_source=powerbicommunity&amp;amp;utm_medium=link&amp;amp;utm_campaign=forum" target="_blank" rel="noopener"&gt;&lt;U&gt;WhatTheFact.bi&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;Follow me: &lt;A title="Click here!" href="https://twitter.com/DenSelimovic" target="_blank" rel="noopener"&gt;&lt;U&gt;twitter.com/DenSelimovic&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 20 Aug 2021 10:02:21 GMT</pubDate>
    <dc:creator>selimovd</dc:creator>
    <dc:date>2021-08-20T10:02:21Z</dc:date>
    <item>
      <title>Count working days of running month [Friday is weekend only] &amp; Days elapsed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2027739#M45381</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me out!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Struggling to create a measure which will return &lt;STRONG&gt;total working days&lt;/STRONG&gt; of current month dynamically&amp;nbsp;&lt;EM&gt;[please note, Friday is only weekend in my organization].&lt;/EM&gt; I would also want to exclude holidays.&amp;nbsp; I have a calendar table [see scrrenshot], now I want to calculate two measures&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;1. Total working days of current month&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;2. Days Elapsed = First Date of current month - Today () -1 &lt;FONT color="#FF0000"&gt;[Excluding weekends and holidays]&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;BR /&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thans in advance&lt;BR /&gt;Mamun&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 17:45:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2027739#M45381</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-20T17:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Count working days of running month [Friday is weekend only] &amp; Days elapsed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2027950#M45387</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to get the working days the following measure should help you:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Amount working day =
CALCULATE(
    COUNTROWS( Calendar ),
    Calendar[Day Name]
        IN {
        "Monday",
        "Tuesday",
        "Wednesday",
        "Thursday"
    }
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;If you need any help please let me know.&lt;/DIV&gt;&lt;DIV&gt;If I answered your question I would be happy if you could mark my post as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; and give it a thumbs up &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Best regards&lt;/DIV&gt;&lt;DIV&gt;Denis&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Blog: &lt;A title="Click here!" href="https://whatthefact.bi/?utm_source=powerbicommunity&amp;amp;utm_medium=link&amp;amp;utm_campaign=forum" target="_blank" rel="noopener"&gt;&lt;U&gt;WhatTheFact.bi&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;Follow me: &lt;A title="Click here!" href="https://twitter.com/DenSelimovic" target="_blank" rel="noopener"&gt;&lt;U&gt;twitter.com/DenSelimovic&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 20 Aug 2021 10:02:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2027950#M45387</guid>
      <dc:creator>selimovd</dc:creator>
      <dc:date>2021-08-20T10:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Count working days of running month [Friday is weekend only] &amp; Days elapsed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2028542#M45426</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="2744" data-lia-user-login="selimovd" class="lia-mention lia-mention-user"&gt;selimovd&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for your time, the measure you suggested retuns total days from entire date range. What I was looking for is total number of working days of current month. E.g 27 is total working days in August if you exclude Fridays. Plus 15th August is the local national holiday, so I would like to exclude this too.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 17:33:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2028542#M45426</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-20T17:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Count working days of running month [Friday is weekend only] &amp; Days elapsed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2028551#M45428</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sure, you have to put the month name in the matrix/table and then add the measure I provided. Then it will show by month name.&lt;/P&gt;&lt;P&gt;Where do you have the information that 15th of August is a holiday in the data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Denis&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 17:41:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2028551#M45428</guid>
      <dc:creator>selimovd</dc:creator>
      <dc:date>2021-08-20T17:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count working days of running month [Friday is weekend only] &amp; Days elapsed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2028741#M45442</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="2744" data-lia-user-login="selimovd" class="lia-mention lia-mention-user"&gt;selimovd&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;Sorry to bother you again, let me tell you what I really need here. I want to see days elapsed percentage &lt;STRONG&gt;[=Days Elapsed/Total Working Days in current month]&lt;/STRONG&gt;&amp;nbsp;to compare with my sales achievement. Also with Days Elapsed measure, I would be able to calculate daily average orders till date.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Answering to your question: I have created a separate table as Holidays2021&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mamun&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Aug 2021 19:02:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2028741#M45442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-20T19:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Count working days of running month [Friday is weekend only] &amp; Days elapsed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2031691#M45556</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you have to integrate that to the calendar table. Maybe add that to the calculated column. If you give more information I can help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your calculation should not be the problem later, that is kind of easy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Denis&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 08:59:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2031691#M45556</guid>
      <dc:creator>selimovd</dc:creator>
      <dc:date>2021-08-23T08:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count working days of running month [Friday is weekend only] &amp; Days elapsed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2040557#M45805</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I could solve your issue.&lt;BR /&gt;In your Calendar table add a new calculated column with the following formula:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Is working day = 
VAR vIsRegularWorkingDay =
    IF(
        WEEKDAY( 'Calendar'[Date], 2 )
            IN { 1, 2, 3, 4 },
        1,
        0
    )
VAR vIsHoliday =
    IF(
        RELATED( Holidays2021[Date] ) &amp;lt;&amp;gt; BLANK(),
        "Holiday",
        "No Holiday"
    )
RETURN
    IF(
        vIsRegularWorkingDay = 1 &amp;amp;&amp;amp; vIsHoliday = "No Holiday",
        1,
        0
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also split that into 3 columns (Is regular Working Day, Is Holiday and Is Working Day.&lt;/P&gt;&lt;P&gt;Like this you will have all working days and also subtracted by the holidays.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then for the elapsed days in current month I would split it in 3 measures:&lt;/P&gt;&lt;P&gt;1. The working days in the current month:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Working Days in current Month =
CALCULATE(
    SUM( 'Calendar'[Is working day] ),
    'Calendar'[Year] = YEAR( TODAY() ) &amp;amp;&amp;amp; 'Calendar'[Month] = MONTH( TODAY() )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. The elapsed days in current month:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Days Elapsed in current Month =
CALCULATE(
    SUM( 'Calendar'[Is working day] ),
    'Calendar'[Date] &amp;lt;= TODAY(),
    'Calendar'[Year] = YEAR( TODAY() ) &amp;amp;&amp;amp; 'Calendar'[Month] = MONTH( TODAY() )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. The measure that returns the percentage in the current month:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Days Elapsed percent =
DIVIDE(
    [Days Elapsed in current Month],
    [Working Days in current Month]
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think like this you should be able to solve all of your issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;If you need any help please let me know.&lt;/DIV&gt;&lt;DIV&gt;If I answered your question I would be happy if you could mark my post as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; and give it a thumbs up &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Best regards&lt;/DIV&gt;&lt;DIV&gt;Denis&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Blog: &lt;A title="Click here!" href="https://whatthefact.bi/?utm_source=powerbicommunity&amp;amp;utm_medium=link&amp;amp;utm_campaign=forum" target="_blank" rel="noopener"&gt;&lt;U&gt;WhatTheFact.bi&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;Follow me: &lt;A title="Click here!" href="https://twitter.com/DenSelimovic" target="_blank" rel="noopener"&gt;&lt;U&gt;twitter.com/DenSelimovic&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Aug 2021 13:42:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2040557#M45805</guid>
      <dc:creator>selimovd</dc:creator>
      <dc:date>2021-08-26T13:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count working days of running month [Friday is weekend only] &amp; Days elapsed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2748138#M84715</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I also have a similar requirement in my Power BI report. I want to know, in case of getting the&amp;nbsp;Elapsed percentages for previous months using a slicer/filter how can we change these measures to caluculate the % dynamically?&amp;nbsp;&lt;BR /&gt;When I tried this measure for my&amp;nbsp;requirement it only gives the correct value for the current month not an elapsed percentage of 100% for the previous month/s.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 15:02:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2748138#M84715</guid>
      <dc:creator>user_dil</dc:creator>
      <dc:date>2022-09-05T15:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count working days of running month [Friday is weekend only] &amp; Days elapsed</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2753753#M85036</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="432974" data-lia-user-login="user_dil" class="lia-mention lia-mention-user"&gt;user_dil&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;you can use variables so your slicer can get you prefered data.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Here's my dax which doesnt return days elapsed of previous months. This is FYI&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Days Elapsed in current Month = &lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;CALCULATE(&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; SUM( 'Calendar'[Is working day] ),&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; 'Calendar'[Date] &amp;lt; TODAY(),&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; 'Calendar'[Year] = YEAR( TODAY() ) &amp;amp;&amp;amp; 'Calendar'[Month] = MONTH( TODAY() )&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Sep 2022 18:25:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-working-days-of-running-month-Friday-is-weekend-only-amp/m-p/2753753#M85036</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-07T18:25:02Z</dc:date>
    </item>
  </channel>
</rss>

