<?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: Change a date to the following Monday if it falls on a weekend in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-a-date-to-the-following-Monday-if-it-falls-on-a-weekend/m-p/820986#M5609</link>
    <description>&lt;P&gt;solved it:&lt;/P&gt;&lt;P&gt;Created a weekday column then used this in a new column:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Date Received = If('Table'[Weekday]=7,'Table'[DATE]+2, If('Vetting Query'[Weekday]=1,'Table'[DATE]+1,'Table'[DATE]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 17 Oct 2019 15:11:41 GMT</pubDate>
    <dc:creator>rjs2</dc:creator>
    <dc:date>2019-10-17T15:11:41Z</dc:date>
    <item>
      <title>Change a date to the following Monday if it falls on a weekend</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-a-date-to-the-following-Monday-if-it-falls-on-a-weekend/m-p/819938#M5554</link>
      <description>&lt;P&gt;I am trying to evaluate a date field and change the date to the following Monday if it falls on a weekend.&amp;nbsp; I tried to use the WEEKDAY and DATEADD in an IF statement.&amp;nbsp; I keep getting :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"A Date Column containing duplicate dates was specified in a call o function 'DATEADD'.&amp;nbsp; This is not supported."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my statement:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Date Received = IF(WEEKDAY('Table'[DATE.FIELD],1)=1,Dateadd('Table'[DATE.FIELD],1,DAY))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I was going to do an embedend IF statement to calculate the Saturday and Sunday days to be the following monday, else use the date.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 16 Oct 2019 16:30:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-a-date-to-the-following-Monday-if-it-falls-on-a-weekend/m-p/819938#M5554</guid>
      <dc:creator>rjs2</dc:creator>
      <dc:date>2019-10-16T16:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Change a date to the following Monday if it falls on a weekend</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-a-date-to-the-following-Monday-if-it-falls-on-a-weekend/m-p/820986#M5609</link>
      <description>&lt;P&gt;solved it:&lt;/P&gt;&lt;P&gt;Created a weekday column then used this in a new column:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Date Received = If('Table'[Weekday]=7,'Table'[DATE]+2, If('Vetting Query'[Weekday]=1,'Table'[DATE]+1,'Table'[DATE]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Oct 2019 15:11:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-a-date-to-the-following-Monday-if-it-falls-on-a-weekend/m-p/820986#M5609</guid>
      <dc:creator>rjs2</dc:creator>
      <dc:date>2019-10-17T15:11:41Z</dc:date>
    </item>
  </channel>
</rss>

