<?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: Calculate the Sunday Date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Sunday-Date/m-p/3535763#M135870</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="646863" data-lia-user-login="jdw_rhodes" class="lia-mention lia-mention-user"&gt;jdw_rhodes&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The basic calculation you could use to convert a date to the Sunday of the same Mon-Sun week would be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;Date&amp;gt; + 7 - WEEKDAY ( &amp;lt;Date&amp;gt;, 2 )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where &amp;lt;Date&amp;gt; is any expression returning a date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The exact way to apply this would depend on the context.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, you could add a "Sunday of Week"column to your Date dimension table (using the above logic), and reference this column as required. This might be more efficient than computing the Sunday date on the fly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2023 19:58:11 GMT</pubDate>
    <dc:creator>OwenAuger</dc:creator>
    <dc:date>2023-11-15T19:58:11Z</dc:date>
    <item>
      <title>Calculate the Sunday Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Sunday-Date/m-p/3535736#M135868</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to take a date, let's say 11/14/2023, and return the Sunday of the week that day falls within. For my PowerBI report, Monday is the first day of the week. So for 11/14/2023, the Sunday of that week it falls within would be 11/19/2023. I've looked at some date functions for dax but can't quite find what I'm looking for. Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 19:06:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Sunday-Date/m-p/3535736#M135868</guid>
      <dc:creator>jdw_rhodes</dc:creator>
      <dc:date>2023-11-15T19:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Sunday Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Sunday-Date/m-p/3535763#M135870</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="646863" data-lia-user-login="jdw_rhodes" class="lia-mention lia-mention-user"&gt;jdw_rhodes&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The basic calculation you could use to convert a date to the Sunday of the same Mon-Sun week would be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;Date&amp;gt; + 7 - WEEKDAY ( &amp;lt;Date&amp;gt;, 2 )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where &amp;lt;Date&amp;gt; is any expression returning a date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The exact way to apply this would depend on the context.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, you could add a "Sunday of Week"column to your Date dimension table (using the above logic), and reference this column as required. This might be more efficient than computing the Sunday date on the fly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 19:58:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Sunday-Date/m-p/3535763#M135870</guid>
      <dc:creator>OwenAuger</dc:creator>
      <dc:date>2023-11-15T19:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Sunday Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Sunday-Date/m-p/3537769#M135938</link>
      <description>&lt;P&gt;Yes that's what I was thinking. Making a column of Sunday of Week that is. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 19:13:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-the-Sunday-Date/m-p/3537769#M135938</guid>
      <dc:creator>jdw_rhodes</dc:creator>
      <dc:date>2023-11-16T19:13:16Z</dc:date>
    </item>
  </channel>
</rss>

