<?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: Start of Week in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3765133#M146937</link>
    <description>&lt;P&gt;there is no such DAX function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you could rephrase your case well and provide solid sample data with expected result, there is always a way.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Mar 2024 05:22:32 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2024-03-15T05:22:32Z</dc:date>
    <item>
      <title>Start of Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3761604#M146765</link>
      <description>&lt;P&gt;I have DAX caluclations that use the STARTOFMONTH function to determine the difference between a date and the start of the month date. But I don't know how to replicate it for the start of the week since STARTOFWEEK is not a function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my logic for start of month:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Loans =&lt;/SPAN&gt; &lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Opportunity&lt;/SPAN&gt;&lt;SPAN&gt;[Id]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Running Total Loans =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Loans]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Opportunity History By Day'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Opportunity History By Day'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Opportunity History By Day'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Running Total &lt;/SPAN&gt;&lt;SPAN&gt;Start&lt;/SPAN&gt;&lt;SPAN&gt; of Month Loans =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Running Total Loans]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;STARTOFMONTH&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Opportunity History By Day Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Running Total &lt;/SPAN&gt;&lt;SPAN&gt;Start&lt;/SPAN&gt;&lt;SPAN&gt; of Month Loans Variance =&lt;/SPAN&gt; &lt;SPAN&gt;[Running Total Loans]&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;[Running Total Start of Month Loans]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is this possible to achieve for the week?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 13 Mar 2024 19:55:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3761604#M146765</guid>
      <dc:creator>TJK</dc:creator>
      <dc:date>2024-03-13T19:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Start of Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3761785#M146780</link>
      <description>&lt;P&gt;First you need to define what you mean by "week".&amp;nbsp; The definition of that varies widely across the globe.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 22:19:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3761785#M146780</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-13T22:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Start of Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3762336#M146804</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="614480" data-lia-user-login="TJK" class="lia-mention lia-mention-user"&gt;TJK&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&amp;nbsp;is right, we all have different definitions of "week".&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If your definition of week is from Monday to Sunday, then you can use the following expression to get the week start date:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Week Start Date = Data[Date] - WEEKDAY(Data[Date],2) + 1&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;where the second parameter in the WEEKDAY function represents the week start date, you can adjust it according to your needs, for more information, please refer to the documentation: &lt;A href="https://learn.microsoft.com/en-us/dax/weekday-function-dax" target="_blank"&gt;WEEKDAY function (DAX) - DAX | Microsoft Learn&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;For more details on setting the week start date, please refer to the link: &lt;A href="https://bielite.com/blog/week-start-date-power-bi-dax/#:~:text=This%20is%20easy%20to%20do%20with%20a%20little,Data%20%5BDate%5D%20%E2%80%93%20WEEKDAY%20%28Data%20%5BDate%5D%2C2%29%20%2B%201" target="_blank"&gt;Calculating Week Start Date with DAX in Power BI - BI Elite&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your Current Period does not refer to this, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Clara Gong&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 05:45:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3762336#M146804</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-14T05:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Start of Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3763495#M146863</link>
      <description>&lt;P&gt;Hello, thanks for the response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anyway to use the weekday function in a measure, not a calculated column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I can do STARTOFMONTH([date]) as a measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot however do WEEKDAY([date],1) as a measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I use WEEKDAY in a measure to get the first day of the week?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 12:01:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3763495#M146863</guid>
      <dc:creator>TJK</dc:creator>
      <dc:date>2024-03-14T12:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Start of Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3763650#M146870</link>
      <description>&lt;LI-CODE lang="markup"&gt;How would I use WEEKDAY in a measure to get the first day of the week?&lt;/LI-CODE&gt;
&lt;P&gt;of which week?&amp;nbsp; Measures operate in filter context.&amp;nbsp; What is your filter context?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 12:51:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3763650#M146870</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-14T12:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Start of Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3763669#M146871</link>
      <description>&lt;P&gt;When I use STARTOFMONTH, the measure simply takes the start of the month of the very first month in my dataset if I don't have any filter context applied.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like STARTOFWEEK to behave the same way.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 12:55:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3763669#M146871</guid>
      <dc:creator>TJK</dc:creator>
      <dc:date>2024-03-14T12:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Start of Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3765133#M146937</link>
      <description>&lt;P&gt;there is no such DAX function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you could rephrase your case well and provide solid sample data with expected result, there is always a way.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 05:22:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3765133#M146937</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-03-15T05:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Start of Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3770802#M147272</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="614480" data-lia-user-login="TJK" class="lia-mention lia-mention-user"&gt;TJK&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;If you want to get the week start date in the current context, just add the column name plus the max function to get the current value, but as Ibendlin said, more information is needed to better help you solve the problem.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If your Current Period does not refer to this, please clarify in a follow-up reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Clara Gong&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 08:45:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/3770802#M147272</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-18T08:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Start of Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/4818599#M184220</link>
      <description>&lt;P&gt;Thanks, this worked perfectly for me! I used it in the Calendar table of Power Pivot&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2025 22:43:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Start-of-Week/m-p/4818599#M184220</guid>
      <dc:creator>lkarak</dc:creator>
      <dc:date>2025-09-05T22:43:43Z</dc:date>
    </item>
  </channel>
</rss>

