<?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: DAX Custom 445 Calendar in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/DAX-Custom-445-Calendar/m-p/2285729#M809</link>
    <description>&lt;P&gt;Hi Greg,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for this. I'm really interested in making it work.&lt;/P&gt;
&lt;P&gt;I'm having trouble in fact, I can't figure it out. I need the calendar to start on Aug 30, 2021&lt;/P&gt;
&lt;P&gt;but I can't figure out what to do to make it start Aug 30, 2021&lt;/P&gt;
&lt;P&gt;Can you point me in the right direction ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;Eric (Montreal, Canada)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jan 2022 03:13:02 GMT</pubDate>
    <dc:creator>ericet</dc:creator>
    <dc:date>2022-01-17T03:13:02Z</dc:date>
    <item>
      <title>DAX Custom 445 Calendar</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/DAX-Custom-445-Calendar/m-p/1388582#M627</link>
      <description>&lt;P&gt;Thanks to a request by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="256491" data-lia-user-login="dogt1225" class="lia-mention lia-mention-user"&gt;dogt1225&lt;/a&gt;&amp;nbsp;from &lt;A href="https://community.powerbi.com/t5/Desktop/Fiscal-Year-Month-and-Week/m-p/1345686" target="_self"&gt;this thread&lt;/A&gt; comes this highly configurable DAX Custom 445 Calendar. Now, this is certainly not the first custom calendar nor will it be the last but it is one that I created and I think it is notable because of how easily configurable it is to customize for your own needs. In this instance, the calendar is configured for weeks starting on Saturday and ending on Friday starting on the 5th Saturday of the year 2020 for 2 years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Additional features of this calendar include assigning a week # of the year, week # of the quarter, sequential week #, quarter, month, day of year, etc.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Custom445 = 
    VAR __StartYear = 2020 // starting year
    VAR __NumYears = 2 // number of years including start year
    VAR __WeekForm = 16 // 16 has Saturday as 1, Friday 7
    VAR __StartDay = 1 // weekday to start calendar on
    VAR __StartWeek = 5 // # instance of weekday to start calendar on (5th Saturday for example)
    VAR __Base = CALENDAR(DATE(__StartYear,1,1),DATE(__StartYear,12,31))
    VAR __StartDate = 
        MAXX(
            FILTER(
                ADDCOLUMNS(
                    __Base,
                    "WeekNum",COUNTROWS(FILTER(__Base,[Date]&amp;lt;=EARLIER([Date]) &amp;amp;&amp;amp; WEEKDAY([Date],16) = __StartDay))
                ),
                [WeekNum]=__StartWeek &amp;amp;&amp;amp; WEEKDAY([Date],16)=__StartDay
            ),
            [Date]
        )
    VAR __CalendarBase = CALENDAR(__StartDate,__StartDate + 52 * __NumYears * 7 - 1)
    VAR __Calendar = 
        ADDCOLUMNS(
            ADDCOLUMNS(
                ADDCOLUMNS(
                    ADDCOLUMNS(
                        __CalendarBase,
                        "Year",ROUNDUP(([Date]-__StartDate+1)*1./ (52*7),0)-1+__StartYear,
                        "DAYOFWK#",MOD(([Date] - __StartDate),7)+1,
                        "SEQWK#",COUNTROWS(FILTER(__CalendarBase,[Date]&amp;lt;=EARLIER([Date]) &amp;amp;&amp;amp; WEEKDAY([Date],16) = __StartDay)),
                        "DAY#YEAR",MOD(([Date]-__StartDate)*1.,(52*7))+1,
                        "DAY",DAY([Date])
                    ),
                    "WK#",ROUNDUP([DAY#YEAR]/7,0),
                    "QWK#",MOD([SEQWK#]-1,13)+1,
                    "Q",ROUNDUP([DAY#YEAR]/91,0)
                ),
                "Month",SWITCH(TRUE(),
                            [Q]=1 &amp;amp;&amp;amp; [QWK#]&amp;lt;=4,1,
                            [Q]=1 &amp;amp;&amp;amp; [QWK#]&amp;lt;=8,2,
                            [Q]=1,3,
                            [Q]=2 &amp;amp;&amp;amp; [QWK#]&amp;lt;=4,4,
                            [Q]=2 &amp;amp;&amp;amp; [QWK#]&amp;lt;=8,5,
                            [Q]=2,6,
                            [Q]=3 &amp;amp;&amp;amp; [QWK#]&amp;lt;=4,7,
                            [Q]=3 &amp;amp;&amp;amp; [QWK#]&amp;lt;=8,8,
                            [Q]=3,9,
                            [Q]=4 &amp;amp;&amp;amp; [QWK#]&amp;lt;=4,10,
                            [Q]=4 &amp;amp;&amp;amp; [QWK#]&amp;lt;=8,11,
                            [Q]=4,12
                        )   
            ),
            "MonthName",
                SWITCH([Month],
                    1,"February",
                    2,"March",
                    3,"April",
                    4,"May",
                    5,"June",
                    6,"July",
                    7,"August",
                    8,"September",
                    9,"October",
                    10,"November",
                    11,"December",
                    12,"January"
                )
        )
RETURN
    __Calendar&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiOTE4YTNmOWUtNTBjOS00ZjM3LWEzZjEtMTU3OTE2YjM5ZmFjIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 00:06:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/DAX-Custom-445-Calendar/m-p/1388582#M627</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-09-23T00:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Custom 445 Calendar</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/DAX-Custom-445-Calendar/m-p/2285729#M809</link>
      <description>&lt;P&gt;Hi Greg,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for this. I'm really interested in making it work.&lt;/P&gt;
&lt;P&gt;I'm having trouble in fact, I can't figure it out. I need the calendar to start on Aug 30, 2021&lt;/P&gt;
&lt;P&gt;but I can't figure out what to do to make it start Aug 30, 2021&lt;/P&gt;
&lt;P&gt;Can you point me in the right direction ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;Eric (Montreal, Canada)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 03:13:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/DAX-Custom-445-Calendar/m-p/2285729#M809</guid>
      <dc:creator>ericet</dc:creator>
      <dc:date>2022-01-17T03:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Custom 445 Calendar</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/DAX-Custom-445-Calendar/m-p/3721924#M1050</link>
      <description>&lt;P&gt;&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;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Feb 2024 13:39:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/DAX-Custom-445-Calendar/m-p/3721924#M1050</guid>
      <dc:creator>technolog</dc:creator>
      <dc:date>2024-02-25T13:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Custom 445 Calendar</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/DAX-Custom-445-Calendar/m-p/4000764#M1102</link>
      <description>&lt;P&gt;&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;Hi Greg,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Your "year" column presuambly shows calander year, how would I add a Fiscal Year column (i.e. the fiscal year of 2021 is from Feb 2020 - Jan 2021). I need to create the above calender although my start dates can be either July/August and span across 3 Financial Years&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 22:02:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/DAX-Custom-445-Calendar/m-p/4000764#M1102</guid>
      <dc:creator>Hezzlington2024</dc:creator>
      <dc:date>2024-06-19T22:02:43Z</dc:date>
    </item>
  </channel>
</rss>

