<?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: Ukrainian Holidays in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Ukrainian-Holidays/m-p/2460162#M837</link>
    <description>&lt;P&gt;Amazing solidarity! Thank you, Greg!&lt;/P&gt;</description>
    <pubDate>Sun, 17 Apr 2022 10:50:26 GMT</pubDate>
    <dc:creator>t_ar_ik</dc:creator>
    <dc:date>2022-04-17T10:50:26Z</dc:date>
    <item>
      <title>Ukrainian Holidays</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Ukrainian-Holidays/m-p/2436854#M833</link>
      <description>&lt;P&gt;OK, all of my recent work on &lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Equinoxes-and-Solstices/td-p/2436682" target="_self"&gt;equinoxes&lt;/A&gt;, &lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Equinoxes-and-Solstices/td-p/2436682" target="_self"&gt;solstices&lt;/A&gt; and &lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Orthodox-Easter/td-p/2436845" target="_self"&gt;Orthodox Easter&lt;/A&gt; were really geared toward publishing this quick measure for Ukrainian Holidays. My heart goes out to Ukrainians everywhere. Let us all pray for peace.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Ukrainian Holidays = 
    VAR __Date = MAX('Dates'[Date])
    VAR __Year = YEAR(__Date)
    VAR __Month = MONTH(__Date)
    VAR __Day = DAY(__Date)
    VAR __Calender1 = 
        ADDCOLUMNS(
            CALENDAR(DATE(__Year, 1, 1), DATE(__Year, 12, 31)),
            "Month",MONTH([Date]),
            "Day",DAY([Date]),
            "Weekday",WEEKDAY([Date],1),
            "Weeknum",WEEKNUM([Date],1)
        )
    VAR __Calendar =
        ADDCOLUMNS(
            __Calender1,
            "WeekdayNum",
                COUNTROWS(
                    FILTER(__Calender1,
                        [Month] = EARLIER([Month]) &amp;amp;&amp;amp; 
                        [Weekday] = EARLIER([Weekday]) &amp;amp;&amp;amp;
                        [Day] &amp;lt;= EARLIER([Day])
                    )
                )
        )
    VAR __Holidays1 = 
        DATATABLE(
            "Country", STRING, // For now, US
            "Name", STRING, // Name of holiday
            "Type", STRING, // Fixed, Floating or Calculated
            "HolidayMonth", INTEGER, // Month number (1-12)
            "HolidayDay", INTEGER, // Day of holiday if Fixed
            "HolidayWeekday", INTEGER, // Weekday (1 = Sunday, 7 = Saturday)
            "HolidayWeeknum", INTEGER, // 1 - 4 occurrence of weekday (first Sunday in April would be 1)
            {
                {"UA","New Year's Day", "Fixed", 1, 1, BLANK(), BLANK()},
                {"UA","Orthodox Christmas Day", "Fixed", 1, 7, BLANK(), BLANK()},
                {"UA","Orthodox New Year", "Fixed", 1, 14, BLANK(), BLANK()},
                {"UA","Ukrainian Unity Day", "Fixed", 1, 22, BLANK(), BLANK()},
                {"UA","Valentine's Day", "Fixed", 2, 14, BLANK(), BLANK()},
                {"UA","Unity Day", "Fixed", 2, 16, BLANK(), BLANK()},
                {"UA","International Women's Day", "Fixed", 3, 8, BLANK(), BLANK()},
                {"UA","March Equinox", "Calculated", BLANK(), BLANK(), BLANK(), BLANK()},
                {"UA","April Fools", "Fixed", 4, 1, BLANK(), BLANK()},
                {"UA","Orthodox Easter Day", "Calculated", BLANK(), BLANK(), BLANK(), BLANK()},
                {"UA","Orthodox Easter Monday", "Calculated", BLANK(), BLANK(), BLANK(), BLANK()},
                {"UA","Labor Day", "Fixed", 5, 1, BLANK(), BLANK()},
                {"UA","Mother's Day", "Floating", 5, BLANK(), 1, 2},
                {"UA","Victory Day", "Fixed", 5, 9, BLANK(), BLANK()},
                {"UA","Europe Day", "Floating", 5, BLANK(), 7, 3},
                {"UA","Kyiv Day", "Calculated", BLANK(), BLANK(), BLANK(), BLANK()},
                {"UA","Child Protection Day", "Fixed", 6, 1, BLANK(), BLANK()},
                {"UA","Journalists' Day", "Fixed", 6, 6, BLANK(), BLANK()},
                {"UA","Orthodox Pentecost", "Calculated", BLANK(), BLANK(), BLANK(), BLANK()},
                {"UA","Orthodox Pentecost Holiday", "Calculated", BLANK(), BLANK(), BLANK(), BLANK()},
                {"UA","June Solstice", "Calculated", BLANK(), BLANK(), BLANK(), BLANK()},
                {"UA","Day of Mourning and Commemoration of War Victims", "Fixed", 6, 22, BLANK(), BLANK()},
                {"UA","Consitution Day", "Fixed", 6, 28, BLANK(), BLANK()},
                {"UA","Navy Day", "Floating", 7, BLANK(), 1, 1},
                {"UA","Kupala Night", "Fixed", 7, 6, BLANK(), BLANK()},
                {"UA","Family Day", "Fixed", 7, 8, BLANK(), BLANK()},
                {"UA","Baptism of Kyivan Rus", "Fixed", 7, 28, BLANK(), BLANK()},
                {"UA","Ukrainian Statehood Day", "Fixed", 7, 28, BLANK(), BLANK()},
                {"UA","Independence Day", "Fixed", 8, 24, BLANK(), BLANK()},
                {"UA","September Equinox", "Calculated", BLANK(), BLANK(), BLANK(), BLANK()},
                {"UA","Day of Defenders and Defenders of Ukraine", "Fixed", 10, 14, BLANK(), BLANK()},
                {"UA","Cultural Workers and Folk Artists Day", "Fixed", 11, 9, BLANK(), BLANK()},
                {"UA","Dignity and Freedom Day", "Fixed", 11, 21, BLANK(), BLANK()},
                {"UA","Army Day", "Fixed", 12, 6, BLANK(), BLANK()},
                {"UA","St. Nicholas Day", "Fixed", 12, 19, BLANK(), BLANK()},
                {"UA","December Solstice", "Calculated", BLANK(), BLANK(), BLANK(), BLANK()},
                {"UA","Catholic Christmas Day", "Fixed", 12, 25, BLANK(), BLANK()}
            }
        )
        VAR __OrthodoxEaster = [Orthodox Easter]
        VAR __OrthodoxPentacost = __OrthodoxEaster + 49
        VAR __KyivDay = DATE(__Year, 5, MAXX(FILTER(__Calendar, [Month]=5 &amp;amp;&amp;amp; [Weekday] = 1),[Day]))
        VAR __Holidays = 
            ADDCOLUMNS(
                __Holidays1,
                "HolidayDate",
                    SWITCH(TRUE(),
                        [Type] = "Fixed", DATE(__Year,[HolidayMonth],[HolidayDay]),
                        [Type] = "Floating",
                            MAXX(
                                FILTER(__Calendar,
                                    [Month] = [HolidayMonth] &amp;amp;&amp;amp; 
                                    [WeekdayNum] = [HolidayWeeknum] &amp;amp;&amp;amp; 
                                    [Weekday] = [HolidayWeekday]
                                ),
                                [Date]
                            ),
                        SWITCH([Name],
                            "March Equinox",TRUNC([March Equinox]),
                            "June Solstice",TRUNC([June Solstice]),
                            "September Equinox",TRUNC([September Equinox]),
                            "December Solstice",TRUNC([December Solstice]),
                            "Orthodox Easter Day",__OrthodoxEaster,
                            "Orthodox Easter Monday",__OrthodoxEaster + 1,
                            "Orthodox Pentecost",__OrthodoxPentacost,
                            "Orthodox Pentecost Holiday",__OrthodoxPentacost + 1,
                            "Kyiv Day",__KyivDay
                        )
                    )
            )
    VAR __HolidayNames = FILTER(__Holidays, [HolidayDate] = __Date)
    VAR __CountOfHolidayNames = COUNTROWS(__HolidayNames)
RETURN
    SWITCH(TRUE(),
        ISBLANK(__CountOfHolidayNames),BLANK(),
        CONCATENATEX(__HolidayNames, [Name], ", ")
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Referrences:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://www.timeanddate.com/" target="_blank"&gt;https://www.timeanddate.com/&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Jean Meeus' Astrological Algorithms&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;A href="https://www.assa.org.au/edm" target="_blank"&gt;https://www.assa.org.au/edm&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiMTc3Nzg5ZjYtNzJmNS00YzRjLThjNmMtMGVhNmJkMDY4NGJhIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 10:12:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Ukrainian-Holidays/m-p/2436854#M833</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2022-04-05T10:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Ukrainian Holidays</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Ukrainian-Holidays/m-p/2460162#M837</link>
      <description>&lt;P&gt;Amazing solidarity! Thank you, Greg!&lt;/P&gt;</description>
      <pubDate>Sun, 17 Apr 2022 10:50:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Ukrainian-Holidays/m-p/2460162#M837</guid>
      <dc:creator>t_ar_ik</dc:creator>
      <dc:date>2022-04-17T10:50:26Z</dc:date>
    </item>
  </channel>
</rss>

