<?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: Fiscal Calendar and week number starting from, April? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fiscal-Calendar-and-week-number-starting-from-April/m-p/869792#M7154</link>
    <description>&lt;P&gt;Here is a potential solution assuming you have some kind of date table with a column called Value that has your dates in it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a "Standard Weeknum" column using WEEKNUM([Value])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a "Standard Month" column using MONTH([Value])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a "Custom Month" column using:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Custom Month = 
    SWITCH(TRUE(),
        [Standard Month] &amp;gt;= 4,[Standard Month] - 3,
        9 + [Standard Month]
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a "Custom Weeknum" column using:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Custom Weeknum = 
    VAR __StartingWeekNum = WEEKNUM(DATE(YEAR([Value]),4,1))
    VAR __EndingWeekNum = WEEKNUM(DATE(YEAR([Value]),12,31)) - __StartingWeekNum + 1
    RETURN
    SWITCH(TRUE(),
        [Standard WeekNum] &amp;gt;= __StartingWeekNum,[Standard WeekNum] - __StartingWeekNum + 1,
        __EndingWeekNum + [Standard WeekNum]
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See attached, Table4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Dec 2019 16:21:11 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2019-12-09T16:21:11Z</dc:date>
    <item>
      <title>Fiscal Calendar and week number starting from, April?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fiscal-Calendar-and-week-number-starting-from-April/m-p/869775#M7153</link>
      <description>&lt;P&gt;ase can some one help me with the fiuscal calender.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ive seen the videos about teh dax to use for a July financial year but our company is in teh uk and runs from April to March each finacial year.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dax comments say just to adjust the numbers to offset&amp;nbsp; to thh relevant date you need however it creates issues, month number 0 and also has month number 13.&amp;nbsp; I just want Aril being month Number 1 and March being month number 12.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be much appreciated thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 16:01:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fiscal-Calendar-and-week-number-starting-from-April/m-p/869775#M7153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-09T16:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal Calendar and week number starting from, April?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fiscal-Calendar-and-week-number-starting-from-April/m-p/869792#M7154</link>
      <description>&lt;P&gt;Here is a potential solution assuming you have some kind of date table with a column called Value that has your dates in it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a "Standard Weeknum" column using WEEKNUM([Value])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a "Standard Month" column using MONTH([Value])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a "Custom Month" column using:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Custom Month = 
    SWITCH(TRUE(),
        [Standard Month] &amp;gt;= 4,[Standard Month] - 3,
        9 + [Standard Month]
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create a "Custom Weeknum" column using:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Custom Weeknum = 
    VAR __StartingWeekNum = WEEKNUM(DATE(YEAR([Value]),4,1))
    VAR __EndingWeekNum = WEEKNUM(DATE(YEAR([Value]),12,31)) - __StartingWeekNum + 1
    RETURN
    SWITCH(TRUE(),
        [Standard WeekNum] &amp;gt;= __StartingWeekNum,[Standard WeekNum] - __StartingWeekNum + 1,
        __EndingWeekNum + [Standard WeekNum]
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See attached, Table4.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 16:21:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fiscal-Calendar-and-week-number-starting-from-April/m-p/869792#M7154</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2019-12-09T16:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal Calendar and week number starting from, April?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fiscal-Calendar-and-week-number-starting-from-April/m-p/870620#M7180</link>
      <description>&lt;P&gt;That worked thank you for your help&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 10:09:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fiscal-Calendar-and-week-number-starting-from-April/m-p/870620#M7180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-10T10:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Fiscal Calendar and week number starting from, April?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fiscal-Calendar-and-week-number-starting-from-April/m-p/1003063#M12733</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I found this measure to be intriguing when compared to what I thought was a different way of doing the same thing.&amp;nbsp; And, you're the author of both methods...so...&lt;BR /&gt;This is the older way of yours to get to a custom week number (fiscal week number) that I had found:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;FiscalWeekNumber =&lt;BR /&gt;VAR fw = [WeekNum] - WEEKNUM(DATE(DateDim[Year],9,1),2) + 1&lt;BR /&gt;RETURN&lt;BR /&gt;IF(fw &amp;lt;= 0, 52 + fw, fw)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When I compare the results between the method describe in this thread to the above I get close, but different results.&amp;nbsp; Compare the files OLD FiscalWeekNumber and NEW FiscalWeekNumber.&amp;nbsp; The results for 2017-12-31 through 2018-01-07 display the inconsistency.&amp;nbsp; The NEW method drops FiscalWeekNumber = 19.&amp;nbsp; I like the idea of using the SWITCH function instead of an IF and am wondering what's causing the difference?&amp;nbsp; By the way, each year at 12-31, the inconsistency redisplays.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://www.dropbox.com/s/ex5vv1190f4xgx4/NEW%20-%20FiscalWeekNumber%20Method.pbix?dl=0" target="_self"&gt;NEW - FiscalWeekNumber Method.pbix&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;A href="https://www.dropbox.com/s/yp3645qc58r2fs0/OLD%20-%20FiscalWeekNumber%20Method.pbix?dl=0" target="_self"&gt;OLD - FiscalWeekNumber Method.pbix&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 01 Apr 2020 16:18:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Fiscal-Calendar-and-week-number-starting-from-April/m-p/1003063#M12733</guid>
      <dc:creator>ronkochanowski</dc:creator>
      <dc:date>2020-04-01T16:18:13Z</dc:date>
    </item>
  </channel>
</rss>

