<?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: Calendar -QTD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1740002#M721134</link>
    <description>&lt;P&gt;Hi Bhai,&lt;/P&gt;&lt;P&gt;Thanks for lighting up on the issue.&lt;/P&gt;&lt;P&gt;I have modified my script with your logic given. But not getting expected output.&lt;/P&gt;&lt;P&gt;I need MTD, QTD, YTD all together in a single field.&lt;/P&gt;&lt;P&gt;QTD is mapping and now YTD and MTD is not mapping to the fact data.&lt;/P&gt;&lt;P&gt;Calendar:&lt;BR /&gt;LOAD *,&lt;BR /&gt;If(InQuarterToDate(SetDateYear(TempDate, Year(Today())), QuarterEnd(SetDateYear(Today(), Year(Today()))), 0), 'QTD') as PeriodScope,&lt;BR /&gt;Month(TempDate) as MonthDesc,&lt;BR /&gt;Num(Month(TempDate)) as Month,&lt;BR /&gt;'Q' &amp;amp; Ceil(Month(TempDate)/3) as Quarter;&lt;BR /&gt;LOAD Date(MakeDate(Year(Today())-5) + IterNo() - 1) as TempDate&lt;BR /&gt;AutoGenerate 1&lt;BR /&gt;While MakeDate(Year(Today())-5) + IterNo() - 1 &amp;lt; MakeDate(Year(Today())+1);&lt;/P&gt;&lt;P&gt;Concatenate&lt;BR /&gt;Load&lt;BR /&gt;If(Day(TempDate) &amp;lt;= Day(Today()) and Month(TempDate) = Month(Today()), 'MTD')as PeriodScope&lt;/P&gt;&lt;P&gt;Resident Calendar;&lt;/P&gt;&lt;P&gt;Concatenate&lt;BR /&gt;LOAD&lt;BR /&gt;IterNo() as Month,&lt;BR /&gt;&lt;BR /&gt;'YTD' as PeriodScope&lt;/P&gt;&lt;P&gt;Resident Calendar&lt;BR /&gt;While IterNo() &amp;lt;= Month&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Aug 2020 16:16:27 GMT</pubDate>
    <dc:creator>krishna20</dc:creator>
    <dc:date>2020-08-31T16:16:27Z</dc:date>
    <item>
      <title>Calendar -QTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739719#M721128</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to include the QTD&amp;nbsp; in the below calendar under the Period flag. Could anyone advise me how to implement this?&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="gmail_signature"&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;As I have 5yrs of data , QTD should reflect all these years.&amp;nbsp;If it is not possible in the below script, advise any other logics in the master calendar.&lt;/P&gt;&lt;P&gt;Note: QTD,MTD,YTD should be in a single field.&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Month:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LOAD * INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Month, Quarter, MonthDesc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 1, Q1, Jan&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 2, Q1, Feb&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 3, Q1, Mar&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 4, Q2, Apr&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 5, Q2, May&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 6, Q2, Jun&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 7, Q3, Jul&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 8, Q3, Aug&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 9, Q3, Sep&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 10, Q4, Oct&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 11, Q4, Nov&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 12, Q4, Dec&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Calendar:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LOAD Distinct Month, 'MTD' as Period Resident Fact;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Left Join (Calendar)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Load&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Month, Quarter , Date(Date#(MonthDesc,'MMM'),'&lt;/SPAN&gt;&lt;SPAN&gt;MMM') as MonthDesc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; resident Month;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Concatenate&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; IterNo() as Month,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; MonthDesc,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 'YTD' as Period,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Quarter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; resident Calendar&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;While IterNo() &amp;lt;= Month;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Drop Table Month;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22678"&gt;@jagan&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/18624"&gt;@Gysbert_Wassenaar&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Krishna&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739719#M721128</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2024-11-16T18:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar -QTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739736#M721129</link>
      <description>&lt;P&gt;Any inputs pls??&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 06:55:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739736#M721129</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2020-08-31T06:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar -QTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739875#M721130</link>
      <description>&lt;P&gt;You want QTD flag for each of the last 5 years? meaning, right now the flag will show 1 for all months of Jul, Aug, and Sep? and rest of the months will be 0?&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 12:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739875#M721130</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-08-31T12:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar -QTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739979#M721131</link>
      <description>&lt;P&gt;Yes, right sunny. T&lt;SPAN&gt;he flag should show 1 for all months of Jul, Aug, and Sep and rest will be 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 14:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739979#M721131</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2020-08-31T14:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar -QTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739990#M721132</link>
      <description>&lt;P&gt;I would do something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If(InQuarterToDate(SetDateYear(TempDate, Year(Today())), QuarterEnd(SetDateYear(Today(), Year(Today()))), 0), 1, 0) as InQuarterFlag&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 31 Aug 2020 15:03:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739990#M721132</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-08-31T15:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar -QTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739993#M721133</link>
      <description>&lt;P&gt;Here is a sample script&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Table:
LOAD *,
	 If(InQuarterToDate(SetDateYear(TempDate, Year(Today())), QuarterEnd(SetDateYear(Today(), Year(Today()))), 0), 1, 0) as InQuarterFlag,
	 Month(TempDate) as MonthDesc,
	 Num(Month(TempDate)) as Month,
	 'Q' &amp;amp; Ceil(Month(TempDate)) as Quarter;
LOAD Date(MakeDate(Year(Today())-5) + IterNo() - 1) as TempDate
AutoGenerate 1
While MakeDate(Year(Today())-5) + IterNo() - 1 &amp;lt; MakeDate(Year(Today())+1);&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 31 Aug 2020 15:12:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1739993#M721133</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-08-31T15:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar -QTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1740002#M721134</link>
      <description>&lt;P&gt;Hi Bhai,&lt;/P&gt;&lt;P&gt;Thanks for lighting up on the issue.&lt;/P&gt;&lt;P&gt;I have modified my script with your logic given. But not getting expected output.&lt;/P&gt;&lt;P&gt;I need MTD, QTD, YTD all together in a single field.&lt;/P&gt;&lt;P&gt;QTD is mapping and now YTD and MTD is not mapping to the fact data.&lt;/P&gt;&lt;P&gt;Calendar:&lt;BR /&gt;LOAD *,&lt;BR /&gt;If(InQuarterToDate(SetDateYear(TempDate, Year(Today())), QuarterEnd(SetDateYear(Today(), Year(Today()))), 0), 'QTD') as PeriodScope,&lt;BR /&gt;Month(TempDate) as MonthDesc,&lt;BR /&gt;Num(Month(TempDate)) as Month,&lt;BR /&gt;'Q' &amp;amp; Ceil(Month(TempDate)/3) as Quarter;&lt;BR /&gt;LOAD Date(MakeDate(Year(Today())-5) + IterNo() - 1) as TempDate&lt;BR /&gt;AutoGenerate 1&lt;BR /&gt;While MakeDate(Year(Today())-5) + IterNo() - 1 &amp;lt; MakeDate(Year(Today())+1);&lt;/P&gt;&lt;P&gt;Concatenate&lt;BR /&gt;Load&lt;BR /&gt;If(Day(TempDate) &amp;lt;= Day(Today()) and Month(TempDate) = Month(Today()), 'MTD')as PeriodScope&lt;/P&gt;&lt;P&gt;Resident Calendar;&lt;/P&gt;&lt;P&gt;Concatenate&lt;BR /&gt;LOAD&lt;BR /&gt;IterNo() as Month,&lt;BR /&gt;&lt;BR /&gt;'YTD' as PeriodScope&lt;/P&gt;&lt;P&gt;Resident Calendar&lt;BR /&gt;While IterNo() &amp;lt;= Month&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 16:16:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1740002#M721134</guid>
      <dc:creator>krishna20</dc:creator>
      <dc:date>2020-08-31T16:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar -QTD</title>
      <link>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1744059#M721135</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp; Further information provided on requirement, any chance you can have another look and provide adjusted code to handle, this one is over my head?&amp;nbsp; I have to say I am a bit confused on the requirement, hopefully it makes sense to you though.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2020 17:08:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calendar-QTD/m-p/1744059#M721135</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-09-15T17:08:38Z</dc:date>
    </item>
  </channel>
</rss>

