<?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: Calculated Column for 445 week approach in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-for-445-week-approach/m-p/1087808#M15596</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont think this is a 445 week approach.&amp;nbsp;This DAX expression creates a calendar but broken in 7 weeks increaments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;445 relates to dividing the year 4 13 week periods. P1 = 4 weeks P2 = 4 weeks P3 = 5 then repeats P4 = 4 weeks P5 = 4 weeks P6 = 5 weeks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There does not seem to be an easy way to do this is DAX.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 May 2020 12:12:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-13T12:12:04Z</dc:date>
    <item>
      <title>Calculated Column for 445 week approach</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-for-445-week-approach/m-p/878835#M7455</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any chance to get the 445-Week approach into a calculated column without Power Query?&lt;/P&gt;&lt;P&gt;Just from a starting point like the 30.12.2019 start date for the first fiscal week for 2020?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found several approaches but all of them are using power query. I am just looking for the calculated column, that shows me the fiscal week and fiscal month.&lt;/P&gt;&lt;P&gt;There are no years with more than 52 weeks. There is a rolling structure.&lt;/P&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 13:42:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-for-445-week-approach/m-p/878835#M7455</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2019-12-18T13:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column for 445 week approach</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-for-445-week-approach/m-p/879272#M7466</link>
      <description>&lt;P&gt;Well, I got this working.&lt;/P&gt;&lt;P&gt;Step 1; create a date table based on CALENDAR() with the desired start of your fiscal year. I used the 30/12/2019 you gave in your question:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table = CALENDAR("30/12/2018", "31/12/2020")&lt;/LI-CODE&gt;&lt;P&gt;Then we add a calculated column to it with the following dax:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FiscalWeek = 
VAR curDate = 'Table'[Date]
VAR week = ROUNDUP(DIVIDE(COUNTROWS(FILTER('Table', 'Table'[Date] &amp;lt;= curDate)), 7, 1), 0)
VAR fiscalWeek = IF(week &amp;gt;= 53, ROUNDUP(MOD(week, 52.00000001), 0), week)
RETURN
fiscalWeek&lt;/LI-CODE&gt;&lt;P&gt;&lt;FONT&gt;This expression is evaluated for each row in the newly created Date table. Line by line:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;VAR curDate = 'Table'[Date] &lt;STRONG&gt;--&amp;gt;&lt;/STRONG&gt; A reference to the current row Date value.&lt;BR /&gt;VAR week = ROUNDUP(DIVIDE(COUNTROWS(FILTER('Table', 'Table'[Date] &amp;lt;= curDate)), 7, 1), 0) &lt;STRONG&gt;--&amp;gt;&lt;/STRONG&gt; From inside out; we count the rows prior to the current row, devide that by 7 and we round it up to the nearest integer.&lt;BR /&gt;VAR fiscalWeek = IF(week &amp;gt;= 53, ROUNDUP(MOD(week, 52.00000001), 0), week) &lt;STRONG&gt;--&amp;gt;&lt;/STRONG&gt; If the week is bigger than 52, we want to dived it by 52.00001 and round it up. This makes sure that we restart at 1 after week 52 has occured. We divide by 52.00001 because if we divide by 52, the Modulus of 104 is 0 (and we want it to be 1).&amp;nbsp;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Let me know if this is what you are looking for! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Djerro123&lt;/P&gt;&lt;P&gt;-------------------------------&lt;/P&gt;&lt;P&gt;If this answered your question, please &lt;STRONG&gt;mark it as the Solution&lt;/STRONG&gt;. This also helps others to find what they are looking for.&lt;/P&gt;&lt;P&gt;Keep those &lt;STRONG&gt;thumbs up&lt;/STRONG&gt; coming! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 19:54:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-for-445-week-approach/m-p/879272#M7466</guid>
      <dc:creator>JarroVGIT</dc:creator>
      <dc:date>2019-12-18T19:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column for 445 week approach</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-for-445-week-approach/m-p/1087808#M15596</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont think this is a 445 week approach.&amp;nbsp;This DAX expression creates a calendar but broken in 7 weeks increaments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;445 relates to dividing the year 4 13 week periods. P1 = 4 weeks P2 = 4 weeks P3 = 5 then repeats P4 = 4 weeks P5 = 4 weeks P6 = 5 weeks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There does not seem to be an easy way to do this is DAX.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 12:12:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column-for-445-week-approach/m-p/1087808#M15596</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-13T12:12:04Z</dc:date>
    </item>
  </channel>
</rss>

