<?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 YTD,MTD,QTD calculation in scripts. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YTD-MTD-QTD-calculation-in-scripts/m-p/489698#M183004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am trying to implement backend scripting to create ytd, mtd and qtd calculation,&lt;/P&gt;&lt;P&gt;I am using PointInReporting.qvw from qlikview help for help but not getting the idea or flow of implementation.&lt;/P&gt;&lt;P&gt;Like i have a calender table:&lt;/P&gt;&lt;P&gt;Calendar:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Date(TempDate,'DD/MM/YYYY') AS [Posting Date], &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Day(TempDate) AS CalendarDayOfMonth, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Week(TempDate) AS CalendarWeekOfYear, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Text(Month(TempDate)) AS Month, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Date(TempDate,'MMMM') AS CalendarFullMonth, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Num#(Date(TempDate,'MM'),'00') AS CalendarMonthNum,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Year(TempDate) AS CalendarYear, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;MonthName(TempDate) AS YearMonth,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;YearName(TempDate, 0, 4) AS FiscalYear,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Left(YearName(TempDate, 0, 4), 4) AS ShortFiscalYear&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;RESIDENT TempCalendar&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where this calendar is linked to other table by Posting Date, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where the tab of Calender is prior to other table containing posting date.&lt;/P&gt;&lt;P&gt;Please provide me help regarding this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Nov 2013 07:28:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-11-26T07:28:28Z</dc:date>
    <item>
      <title>YTD,MTD,QTD calculation in scripts.</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-MTD-QTD-calculation-in-scripts/m-p/489698#M183004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am trying to implement backend scripting to create ytd, mtd and qtd calculation,&lt;/P&gt;&lt;P&gt;I am using PointInReporting.qvw from qlikview help for help but not getting the idea or flow of implementation.&lt;/P&gt;&lt;P&gt;Like i have a calender table:&lt;/P&gt;&lt;P&gt;Calendar:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Date(TempDate,'DD/MM/YYYY') AS [Posting Date], &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Day(TempDate) AS CalendarDayOfMonth, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Week(TempDate) AS CalendarWeekOfYear, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Text(Month(TempDate)) AS Month, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Date(TempDate,'MMMM') AS CalendarFullMonth, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Num#(Date(TempDate,'MM'),'00') AS CalendarMonthNum,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Year(TempDate) AS CalendarYear, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;MonthName(TempDate) AS YearMonth,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;YearName(TempDate, 0, 4) AS FiscalYear,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Left(YearName(TempDate, 0, 4), 4) AS ShortFiscalYear&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;RESIDENT TempCalendar&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ORDER BY TempDate ASC;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where this calendar is linked to other table by Posting Date, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where the tab of Calender is prior to other table containing posting date.&lt;/P&gt;&lt;P&gt;Please provide me help regarding this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 07:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-MTD-QTD-calculation-in-scripts/m-p/489698#M183004</guid>
      <dc:creator />
      <dc:date>2013-11-26T07:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: YTD,MTD,QTD calculation in scripts.</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-MTD-QTD-calculation-in-scripts/m-p/489699#M183005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can create calander in this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Date([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;,'DD/MM/YYYY') AS [Posting Date],&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Day([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;) AS CalendarDayOfMonth,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Week([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;) AS CalendarWeekOfYear,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Text(Month([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;)) AS Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Date([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;,'MMMM') AS CalendarFullMonth,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Num#(Date([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;,'MM'),'00') AS CalendarMonthNum,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Year([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;) AS CalendarYear,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;MonthName([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;) AS YearMonth,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;YearName([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;, 0, 4) AS FiscalYear,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Left(YearName([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;, 0, 4), 4) AS ShortFiscalYear;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LOAD Date(MinDate + IterNo() -1 ) AS [&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt; While (MinDate + IterNo() - 1) &amp;lt;= Num(MaxDate);&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; Floor(MonthStart(Min([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;))) AS MinDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Floor(MonthEnd(Max([&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;))) AS MaxDate&lt;/P&gt;&lt;P&gt;RESIDENT SourceTable&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;ORDER BY [&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Posting Date]&lt;/SPAN&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And after that it will be link itself if you will give same name as calander date column name.&lt;/P&gt;&lt;P&gt;I hope this helps you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ashutosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 07:53:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-MTD-QTD-calculation-in-scripts/m-p/489699#M183005</guid>
      <dc:creator />
      <dc:date>2013-11-26T07:53:38Z</dc:date>
    </item>
  </channel>
</rss>

