<?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: Weekly Date-Start Date and End Date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2169873#M50366</link>
    <description>&lt;P&gt;Thanks so much&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;would you like to send me the pbix file. it will be really helpfull ?&lt;/P&gt;</description>
    <pubDate>Wed, 03 Nov 2021 06:43:23 GMT</pubDate>
    <dc:creator>TaufikMaggangka</dc:creator>
    <dc:date>2021-11-03T06:43:23Z</dc:date>
    <item>
      <title>Weekly Date-Start Date and End Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2169711#M50358</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;I am trying to create weekly range column(from monday to saturday) using addtional column week start date and week end date, but then realized that the start date not started in first date of the month as well as the week and date not end in last of the month. Here the dax i am used :&amp;nbsp;&lt;BR /&gt;Start date :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Week Start Date = Sheet1[Date] - WEEKDAY(Sheet1[Date],2)+1&lt;/LI-CODE&gt;&lt;P&gt;end date:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Week End Date = Sheet1[Date] - WEEKDAY(Sheet1[Date],2)+6&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Basically, I want to start date always in the first day of the month basically day 1(for instance 1 september) and end date in 31 or 30 (for instance 30 september).&lt;BR /&gt;&lt;BR /&gt;Anyone can help with this, please also see my atatched pbix here :&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/143dko9boxjZuBkhxBTQQlhOiWW0t3HEP/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/143dko9boxjZuBkhxBTQQlhOiWW0t3HEP/view?usp=sharing&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I hope there were an expert can help, I am quite new in the Power BI.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 03:29:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2169711#M50358</guid>
      <dc:creator>TaufikMaggangka</dc:creator>
      <dc:date>2021-11-03T03:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Weekly Date-Start Date and End Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2169753#M50359</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312193" data-lia-user-login="TaufikMaggangka" class="lia-mention lia-mention-user"&gt;TaufikMaggangka&lt;/a&gt; , Week that start with month start date and +7 days after that &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Week Start at Month = eomonth([Date],-1)+0 &lt;BR /&gt;Week No = QUOTIENT(datediff([Week Start at Month],[Date],day) ,7)+1&lt;BR /&gt;Week Start Date =[Week Start at Month] + QUOTIENT(datediff([Week Start at Month],[Date],day) ,7)*7 &lt;BR /&gt;Week End Date = if([Week Start Date] +7 &amp;lt;=eomonth([Date],0), [Week Start Date] +7 ,eomonth([Date],0))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Conrolling the week&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start Month = STARTOMONTH('Date'[Date]) // or // eomonth([Date],-1)+0 &lt;BR /&gt;WeekDay = WEEKDAY([Date],2) //monday&lt;BR /&gt;Start of Week = if([Start Month]&amp;gt; [Date] -[WeekDay]+1 ,&amp;nbsp;[Start Month] ,&amp;nbsp;[Date] -[WeekDay]+1 )&amp;nbsp; //monday &lt;BR /&gt;Month Week = QUOTIENT(DATEDIFF(Minx(FILTER('Date',[Start Month]=EARLIER([Start Month])),'Date'[Start of Week]),[Date],DAY),7)+1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Week End date = if( eomonth([Date,0]) &amp;lt; 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2), eomonth([Date,0]) , 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2))&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 04:26:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2169753#M50359</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-11-03T04:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Weekly Date-Start Date and End Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2169873#M50366</link>
      <description>&lt;P&gt;Thanks so much&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;would you like to send me the pbix file. it will be really helpfull ?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 06:43:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2169873#M50366</guid>
      <dc:creator>TaufikMaggangka</dc:creator>
      <dc:date>2021-11-03T06:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Weekly Date-Start Date and End Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2169907#M50368</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312193" data-lia-user-login="TaufikMaggangka" class="lia-mention lia-mention-user"&gt;TaufikMaggangka&lt;/a&gt; , Please find the attached file. with some minor changes &lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 07:09:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2169907#M50368</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-11-03T07:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Weekly Date-Start Date and End Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2173830#M50538</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="312193" data-lia-user-login="TaufikMaggangka" class="lia-mention lia-mention-user"&gt;TaufikMaggangka&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I used those 4 columns to achieve your requirement, see&amp;nbsp;pbix&amp;nbsp;at the end.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically I split the days into 5 groups with 6 days each because you want the new week to be Monday&amp;nbsp;to Saturdays.&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;Then I use Rankx to get the new weekday.\&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;EM&gt;New weekday = RANKX(FILTER(Sheet1,[Year]=EARLIER([Year])&amp;amp;&amp;amp;[Month]=EARLIER([Month])&amp;amp;&amp;amp;[Day (bins)]=EARLIER([Day (bins)])),Sheet1[Day],,ASC)&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;Paul Zheng _ Community Support Team&lt;BR /&gt;If this post helps, please Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 03:22:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2173830#M50538</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-05T03:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Weekly Date-Start Date and End Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2584736#M74291</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thank you so much for help.&lt;BR /&gt;I try your suggestion based on the PBIX file that you send, it working fine until I got a first daay of the month that start in sunday.&amp;nbsp; Please see image attached.&lt;BR /&gt;&lt;BR /&gt;Basically, I need the start of the week for each monday is start from monday. Try to find any sollutions but stuck, but I found that maybe it can be fix it if start of the month dax is change to start from Monday.&lt;BR /&gt;Is it possible to change the query for the start month is start from monday.&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 06:49:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Weekly-Date-Start-Date-and-End-Date/m-p/2584736#M74291</guid>
      <dc:creator>TaufikMaggangka</dc:creator>
      <dc:date>2022-06-17T06:49:44Z</dc:date>
    </item>
  </channel>
</rss>

