<?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: Adding working days to date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-working-days-to-date/m-p/4044094#M160405</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="413988" data-lia-user-login="jimpatel" class="lia-mention lia-mention-user"&gt;jimpatel&lt;/a&gt;&amp;nbsp;, Try using below measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Due Date = &lt;BR /&gt;VAR CurrentDate = 'Table1'[Date]&lt;BR /&gt;VAR DayOfWeek = WEEKDAY(CurrentDate, 2) -- 2 means Monday=1, Tuesday=2, ..., Sunday=7&lt;BR /&gt;RETURN&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;DayOfWeek &amp;lt;= 3, CurrentDate + 2, -- Monday to Wednesday&lt;BR /&gt;DayOfWeek = 4, CurrentDate + 4, -- Thursday&lt;BR /&gt;DayOfWeek = 5, CurrentDate + 4, -- Friday&lt;BR /&gt;DayOfWeek = 6, CurrentDate + 4, -- Saturday&lt;BR /&gt;DayOfWeek = 7, CurrentDate + 3 -- Sunday&lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jul 2024 10:04:29 GMT</pubDate>
    <dc:creator>bhanu_gautam</dc:creator>
    <dc:date>2024-07-16T10:04:29Z</dc:date>
    <item>
      <title>Adding working days to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-working-days-to-date/m-p/4044057#M160402</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for looking at my post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using below formula but for somereason it is not working correctly. What i am looking for is i wanted to add 2 working days extra to "Date" column. If Date fall on 11th july (thursday) then new date will be 15th July (Monday) due to weekend inbetween. Any idea please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;Table1&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Due Date = SWITCH(TRUE(),
         WEEKDAY( 'Table1'[Date] + 1,1) = 7 , 'Table1'[Date] + 4, 'Table1'[Date] + 2
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 09:46:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-working-days-to-date/m-p/4044057#M160402</guid>
      <dc:creator>jimpatel</dc:creator>
      <dc:date>2024-07-16T09:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adding working days to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-working-days-to-date/m-p/4044094#M160405</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="413988" data-lia-user-login="jimpatel" class="lia-mention lia-mention-user"&gt;jimpatel&lt;/a&gt;&amp;nbsp;, Try using below measure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Due Date = &lt;BR /&gt;VAR CurrentDate = 'Table1'[Date]&lt;BR /&gt;VAR DayOfWeek = WEEKDAY(CurrentDate, 2) -- 2 means Monday=1, Tuesday=2, ..., Sunday=7&lt;BR /&gt;RETURN&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;DayOfWeek &amp;lt;= 3, CurrentDate + 2, -- Monday to Wednesday&lt;BR /&gt;DayOfWeek = 4, CurrentDate + 4, -- Thursday&lt;BR /&gt;DayOfWeek = 5, CurrentDate + 4, -- Friday&lt;BR /&gt;DayOfWeek = 6, CurrentDate + 4, -- Saturday&lt;BR /&gt;DayOfWeek = 7, CurrentDate + 3 -- Sunday&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 10:04:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-working-days-to-date/m-p/4044094#M160405</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2024-07-16T10:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding working days to date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-working-days-to-date/m-p/4070885#M161611</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="413988" data-lia-user-login="jimpatel" class="lia-mention lia-mention-user"&gt;jimpatel&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I create a table as you mentioned. Then I create a calculated column and here is the DAX code.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NewDate = 
VAR StartDate = 'Table'[Date]
VAR DaysToAdd = 2
VAR WeekdayNumber =
    WEEKDAY ( StartDate, 2 )
VAR DaysAdded =
    SWITCH (
        TRUE (),
        WeekdayNumber + DaysToAdd &amp;lt;= 5, DaysToAdd,
        WeekdayNumber + DaysToAdd &amp;gt; 5, DaysToAdd + 2
    )
RETURN
    StartDate + DaysAdded&lt;/LI-CODE&gt;
&lt;P&gt;Finally I will get what you want.&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 08:42:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Adding-working-days-to-date/m-p/4070885#M161611</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-31T08:42:34Z</dc:date>
    </item>
  </channel>
</rss>

