<?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 sort weeks by dates in the calendar in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sort-weeks-by-dates-in-the-calendar/m-p/2310174#M57396</link>
    <description>&lt;P&gt;hello ,&lt;/P&gt;&lt;P&gt;im&amp;nbsp; trying to create a column that sorts weeks according to dates rather than week name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex. w1 2022 would be : january1-2022 till january7-2022&lt;/P&gt;&lt;P&gt;w2 would be be january8-2022 till&amp;nbsp;january14-2022&lt;/P&gt;&lt;P&gt;w3 woud be&amp;nbsp; january15-2022 till&amp;nbsp; january21-2022&amp;nbsp;&lt;/P&gt;&lt;P&gt;where W1 should always be first 7 days of the begining of the year&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i was trying to use weeknum function but its sorting weeks according to weekdays from Sunday till Saturday&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jan 2022 08:37:15 GMT</pubDate>
    <dc:creator>lawada</dc:creator>
    <dc:date>2022-01-31T08:37:15Z</dc:date>
    <item>
      <title>sort weeks by dates in the calendar</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sort-weeks-by-dates-in-the-calendar/m-p/2310174#M57396</link>
      <description>&lt;P&gt;hello ,&lt;/P&gt;&lt;P&gt;im&amp;nbsp; trying to create a column that sorts weeks according to dates rather than week name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex. w1 2022 would be : january1-2022 till january7-2022&lt;/P&gt;&lt;P&gt;w2 would be be january8-2022 till&amp;nbsp;january14-2022&lt;/P&gt;&lt;P&gt;w3 woud be&amp;nbsp; january15-2022 till&amp;nbsp; january21-2022&amp;nbsp;&lt;/P&gt;&lt;P&gt;where W1 should always be first 7 days of the begining of the year&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i was trying to use weeknum function but its sorting weeks according to weekdays from Sunday till Saturday&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 08:37:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sort-weeks-by-dates-in-the-calendar/m-p/2310174#M57396</guid>
      <dc:creator>lawada</dc:creator>
      <dc:date>2022-01-31T08:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: sort weeks by dates in the calendar</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sort-weeks-by-dates-in-the-calendar/m-p/2310191#M57398</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;WEEKNUM accepts second parameter where you can define the start date of the week. I recommend cheking this documentation about the function:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-US/dax/weeknum-function-dax" target="_blank"&gt;https://docs.microsoft.com/en-US/dax/weeknum-function-dax&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 08:49:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sort-weeks-by-dates-in-the-calendar/m-p/2310191#M57398</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2022-01-31T08:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: sort weeks by dates in the calendar</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sort-weeks-by-dates-in-the-calendar/m-p/2310224#M57402</link>
      <description>&lt;P&gt;the documentation explains the sorting according to weekdays as well. im trying to do something different and sort by dates in the calender as the example i mentiond . any solution for that ?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 09:05:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sort-weeks-by-dates-in-the-calendar/m-p/2310224#M57402</guid>
      <dc:creator>lawada</dc:creator>
      <dc:date>2022-01-31T09:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: sort weeks by dates in the calendar</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sort-weeks-by-dates-in-the-calendar/m-p/2310275#M57407</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="222024" data-lia-user-login="lawada" class="lia-mention lia-mention-user"&gt;lawada&lt;/a&gt; , Try columns like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Week No = &lt;BR /&gt;Var _start = date(Year([Date]),1,1) &lt;BR /&gt;return &lt;BR /&gt;quotient(datediff(_start,[Date],day) ,7)+1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Week Year = Year([Date])*100 + [Week No]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Week Start Date = date(Year([Date]),1,1) + ([Week NO]-1) * 7&lt;/P&gt;
&lt;P&gt;if(isfiltered('Table Name'[Column name]), Selectedvalue('Table Name'[Column name]), "All")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Week That Resets Yearly &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Week-That-Resets-Yearly-Decoding-Date-and-Calendar-3-5-Power-BI/ba-p/1187502" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Week-That-Resets-Yearly-Decoding-Date-and-Calendar-3-5-Power-BI/ba-p/1187502&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jan 2022 09:19:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/sort-weeks-by-dates-in-the-calendar/m-p/2310275#M57407</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-01-31T09:19:46Z</dc:date>
    </item>
  </channel>
</rss>

