<?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: Date Table 12 week period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896647#M151867</link>
    <description>&lt;P&gt;Thank you I will try it.&amp;nbsp; The only issue I have is that I have a lot of reports that use that date table so it may take some time to convert all my reports to point to a new table.&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2024 20:50:45 GMT</pubDate>
    <dc:creator>spandy34</dc:creator>
    <dc:date>2024-05-06T20:50:45Z</dc:date>
    <item>
      <title>Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3895551#M151812</link>
      <description>&lt;P&gt;I have a Date Table which in the 12 Week Period Column creates a new period for every 12 weeks as per the column highlighted.&amp;nbsp; What the 12 Weeks Period is doing through is going back to 1 at the beginning of the new year so for Date 01 January 2024 the 12 Weeks Period has gone back to 1 but there are not 12 weeks in Period 5.&amp;nbsp; How do I get the column so it just rolls on without returning back to 1 for a new year?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="15697" data-lia-user-login="danextian" class="lia-mention lia-mention-user"&gt;danextian&lt;/a&gt;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 13:24:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3895551#M151812</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2024-05-06T13:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896304#M151848</link>
      <description>&lt;P&gt;Are you taking the WeekNo from a different table, or is your Date table really called 'Procurement_Delivered_Visit_Date' ?&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 19:00:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896304#M151848</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-06T19:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896312#M151849</link>
      <description>&lt;P&gt;The date table is called&amp;nbsp;&lt;SPAN&gt;Procurement_Delivered_Visit_Date' and the WeekNo is the column next to the 12 Week Period column&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 19:03:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896312#M151849</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2024-05-06T19:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896339#M151851</link>
      <description>&lt;P&gt;Change your approach. Convert the Date into an integer, integer divide that by 7, then modulo that by 12 and add 1.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 19:11:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896339#M151851</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-06T19:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896355#M151852</link>
      <description>&lt;P&gt;Is that for the 12 Weeks Previous column ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 19:15:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896355#M151852</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2024-05-06T19:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896365#M151853</link>
      <description>&lt;P&gt;yes - if you can indicate where the count should start.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 19:18:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896365#M151853</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-06T19:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896602#M151859</link>
      <description>&lt;P&gt;I don't really understand what you mean . How can I change the Date field to a Integer field ? Can you write the column for the 12 Weeks Period with the rolling numbers as I don't understand.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 20:31:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896602#M151859</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2024-05-06T20:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896619#M151865</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromList(List.Dates(#date(2023,9,20),1000,#duration(1,0,0,0)),Splitter.SplitByNothing(), {"Date"}),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "DateNumber", each Int64.From([Date]),Int64.Type),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "12WeekPeriod", each Int64.From([DateNumber]/84),Int64.Type)
in
    #"Added Custom1"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the Source step with your own source.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 20:57:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896619#M151865</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-06T20:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896647#M151867</link>
      <description>&lt;P&gt;Thank you I will try it.&amp;nbsp; The only issue I have is that I have a lot of reports that use that date table so it may take some time to convert all my reports to point to a new table.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 20:50:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896647#M151867</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2024-05-06T20:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896662#M151869</link>
      <description>&lt;P&gt;please use my updated/simplified code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you expecting these period numbers to restart? If so, what would be the rule for that?&amp;nbsp; As you are aware years and weeks are not compatible.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 21:01:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3896662#M151869</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-06T21:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3919335#M152561</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="333315" data-lia-user-login="spandy34" class="lia-mention lia-mention-user"&gt;spandy34&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 06:04:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3919335#M152561</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-15T06:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Date Table 12 week period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3923646#M152683</link>
      <description>&lt;P&gt;Hi - yes I did.&amp;nbsp; I created the following 12 Weeks Period column as suggested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;12&lt;/SPAN&gt;&lt;SPAN&gt; Weeks Period =&lt;/SPAN&gt; &lt;SPAN&gt;ROUNDUP&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Procurement_Planned_Visit_Date'&lt;/SPAN&gt;&lt;SPAN&gt;[WeekNo]&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;12&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The column included the WeekNo column.&amp;nbsp; The WeekNo was initially &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"WeekNo", WEEKNUM( [Date] ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But I changed the WeekNo column to the following and it has worked so I now get continuous week numbers&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Week No", QUOTIENT( datediff(minx(_tab, [Date]),[date],day) ,7)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;So now the 12 Week Column covers multiple years if you look at the CalYear column below.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 May 2024 10:44:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Table-12-week-period/m-p/3923646#M152683</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2024-05-16T10:44:16Z</dc:date>
    </item>
  </channel>
</rss>

