<?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 Auto Calendar: Same Week Number appearing in two different Months in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Auto-Calendar-Same-Week-Number-appearing-in-two-different-Months/m-p/2089627#M89312</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am using below script to load auto calendar Year, Month, Week, and Date. I have an issue that W26 is appearing in both June and July because it contains dates that fall both in June and July (25 Jun-1 Jul). But of course it should be considered as a Week that belongs only to June. How can I solve this?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik88_0-1688143539700.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111399i856002B4CB0237C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="qlik88_0-1688143539700.png" alt="qlik88_0-1688143539700.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[autoCalendar]: &lt;BR /&gt;DECLARE FIELD DEFINITION Tagged ('$date')&lt;BR /&gt;FIELDS&lt;BR /&gt;Dual(Year($1), YearStart($1)) AS [Year] Tagged ('$axis', '$year'),&lt;BR /&gt;Dual('Q'&amp;amp;Num(Ceil(Num(Month($1))/3)),Num(Ceil(NUM(Month($1))/3),00)) AS [Quarter] Tagged ('$quarter', '$cyclic'),&lt;BR /&gt;Dual(Year($1)&amp;amp;'-Q'&amp;amp;Num(Ceil(Num(Month($1))/3)),QuarterStart($1)) AS [YearQuarter] Tagged ('$yearquarter', '$qualified'),&lt;BR /&gt;Dual('Q'&amp;amp;Num(Ceil(Num(Month($1))/3)),QuarterStart($1)) AS [_YearQuarter] Tagged ('$yearquarter', '$hidden', '$simplified'),&lt;BR /&gt;Month($1) AS [Month] Tagged ('$month', '$cyclic'),&lt;BR /&gt;Dual(Year($1)&amp;amp;'-'&amp;amp;Month($1), monthstart($1)) AS [YearMonth] Tagged ('$axis', '$yearmonth', '$qualified'),&lt;BR /&gt;Dual(Month($1), monthstart($1)) AS [_YearMonth] Tagged ('$axis', '$yearmonth', '$simplified', '$hidden'),&lt;BR /&gt;Dual('W'&amp;amp;Num(Week($1),00), Num(Week($1),00)) AS [Week] Tagged ('$weeknumber', '$cyclic'),&lt;BR /&gt;Date(Floor($1)) AS [Date] Tagged ('$axis', '$date', '$qualified'),&lt;BR /&gt;Date(Floor($1), 'D') AS [_Date] Tagged ('$axis', '$date', '$hidden', '$simplified'),&lt;BR /&gt;If (DayNumberOfYear($1) &amp;lt;= DayNumberOfYear(Today()), 1, 0) AS [InYTD] ,&lt;BR /&gt;Year(Today())-Year($1) AS [YearsAgo] ,&lt;BR /&gt;If (DayNumberOfQuarter($1) &amp;lt;= DayNumberOfQuarter(Today()),1,0) AS [InQTD] ,&lt;BR /&gt;4*Year(Today())+Ceil(Month(Today())/3)-4*Year($1)-Ceil(Month($1)/3) AS [QuartersAgo] ,&lt;BR /&gt;Ceil(Month(Today())/3)-Ceil(Month($1)/3) AS [QuarterRelNo] ,&lt;BR /&gt;If(Day($1)&amp;lt;=Day(Today()),1,0) AS [InMTD] ,&lt;BR /&gt;12*Year(Today())+Month(Today())-12*Year($1)-Month($1) AS [MonthsAgo] ,&lt;BR /&gt;Month(Today())-Month($1) AS [MonthRelNo] ,&lt;BR /&gt;If(WeekDay($1)&amp;lt;=WeekDay(Today()),1,0) AS [InWTD] ,&lt;BR /&gt;(WeekStart(Today())-WeekStart($1))/7 AS [WeeksAgo] ,&lt;BR /&gt;Week(Today())-Week($1) AS [WeekRelNo] ;&lt;/P&gt;
&lt;P&gt;DERIVE FIELDS FROM FIELDS [Date] USING [autoCalendar] ;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jun 2023 16:46:33 GMT</pubDate>
    <dc:creator>qlik88</dc:creator>
    <dc:date>2023-06-30T16:46:33Z</dc:date>
    <item>
      <title>Auto Calendar: Same Week Number appearing in two different Months</title>
      <link>https://community.qlik.com/t5/App-Development/Auto-Calendar-Same-Week-Number-appearing-in-two-different-Months/m-p/2089627#M89312</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am using below script to load auto calendar Year, Month, Week, and Date. I have an issue that W26 is appearing in both June and July because it contains dates that fall both in June and July (25 Jun-1 Jul). But of course it should be considered as a Week that belongs only to June. How can I solve this?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik88_0-1688143539700.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/111399i856002B4CB0237C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="qlik88_0-1688143539700.png" alt="qlik88_0-1688143539700.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[autoCalendar]: &lt;BR /&gt;DECLARE FIELD DEFINITION Tagged ('$date')&lt;BR /&gt;FIELDS&lt;BR /&gt;Dual(Year($1), YearStart($1)) AS [Year] Tagged ('$axis', '$year'),&lt;BR /&gt;Dual('Q'&amp;amp;Num(Ceil(Num(Month($1))/3)),Num(Ceil(NUM(Month($1))/3),00)) AS [Quarter] Tagged ('$quarter', '$cyclic'),&lt;BR /&gt;Dual(Year($1)&amp;amp;'-Q'&amp;amp;Num(Ceil(Num(Month($1))/3)),QuarterStart($1)) AS [YearQuarter] Tagged ('$yearquarter', '$qualified'),&lt;BR /&gt;Dual('Q'&amp;amp;Num(Ceil(Num(Month($1))/3)),QuarterStart($1)) AS [_YearQuarter] Tagged ('$yearquarter', '$hidden', '$simplified'),&lt;BR /&gt;Month($1) AS [Month] Tagged ('$month', '$cyclic'),&lt;BR /&gt;Dual(Year($1)&amp;amp;'-'&amp;amp;Month($1), monthstart($1)) AS [YearMonth] Tagged ('$axis', '$yearmonth', '$qualified'),&lt;BR /&gt;Dual(Month($1), monthstart($1)) AS [_YearMonth] Tagged ('$axis', '$yearmonth', '$simplified', '$hidden'),&lt;BR /&gt;Dual('W'&amp;amp;Num(Week($1),00), Num(Week($1),00)) AS [Week] Tagged ('$weeknumber', '$cyclic'),&lt;BR /&gt;Date(Floor($1)) AS [Date] Tagged ('$axis', '$date', '$qualified'),&lt;BR /&gt;Date(Floor($1), 'D') AS [_Date] Tagged ('$axis', '$date', '$hidden', '$simplified'),&lt;BR /&gt;If (DayNumberOfYear($1) &amp;lt;= DayNumberOfYear(Today()), 1, 0) AS [InYTD] ,&lt;BR /&gt;Year(Today())-Year($1) AS [YearsAgo] ,&lt;BR /&gt;If (DayNumberOfQuarter($1) &amp;lt;= DayNumberOfQuarter(Today()),1,0) AS [InQTD] ,&lt;BR /&gt;4*Year(Today())+Ceil(Month(Today())/3)-4*Year($1)-Ceil(Month($1)/3) AS [QuartersAgo] ,&lt;BR /&gt;Ceil(Month(Today())/3)-Ceil(Month($1)/3) AS [QuarterRelNo] ,&lt;BR /&gt;If(Day($1)&amp;lt;=Day(Today()),1,0) AS [InMTD] ,&lt;BR /&gt;12*Year(Today())+Month(Today())-12*Year($1)-Month($1) AS [MonthsAgo] ,&lt;BR /&gt;Month(Today())-Month($1) AS [MonthRelNo] ,&lt;BR /&gt;If(WeekDay($1)&amp;lt;=WeekDay(Today()),1,0) AS [InWTD] ,&lt;BR /&gt;(WeekStart(Today())-WeekStart($1))/7 AS [WeeksAgo] ,&lt;BR /&gt;Week(Today())-Week($1) AS [WeekRelNo] ;&lt;/P&gt;
&lt;P&gt;DERIVE FIELDS FROM FIELDS [Date] USING [autoCalendar] ;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 16:46:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Auto-Calendar-Same-Week-Number-appearing-in-two-different-Months/m-p/2089627#M89312</guid>
      <dc:creator>qlik88</dc:creator>
      <dc:date>2023-06-30T16:46:33Z</dc:date>
    </item>
  </channel>
</rss>

