<?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: Peek or Previous in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105224#M758396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI K,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have given the below expression in one table it-self:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Previous(Key_EMS) &amp;lt;&amp;gt; Key_EMS,($(MonthDiff(Technical_Start_Date, Calendar_Month_Code))),&lt;/P&gt;&lt;P&gt;if(Previous(Install_Flag) = 1,rangesum(peek('Age'),1),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Previous(Removal_Flag) = 1, 0, if(Previous(Peek('Age2')) = 0, 0, Rangesum(Peek('Age2'),1))))) as Age2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it is perfectly working fine. Is this correct right condition right or anything wrong..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Sep 2018 14:17:54 GMT</pubDate>
    <dc:creator>bharatkishore</dc:creator>
    <dc:date>2018-09-07T14:17:54Z</dc:date>
    <item>
      <title>Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105206#M758378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I have the below script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SET MonthDiff = Num(((year($2) * 12) + month($2)) - (((year($1) * 12) + month($1))) + 1);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NoConcatenate&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;T:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Equipment,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System_Code,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Calendar_Month_Code,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Contract,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Warranty,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Installation,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UnResolved,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [T&amp;amp;M],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Part Group],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key_EMS,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Install_Flag ,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Removal_Flag ,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Technical_Start_Date,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;($(MonthDiff(Technical_Start_Date, Calendar_Month_Code))) AS Age&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Equipments_Details_final;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DROP Table Equipments_Details_final;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Now in the front end i load all the fields in a chart as below image:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-1543090-212910/T.PNG" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7;" target="_blank"&gt;&lt;IMG alt="T.PNG" class="jive-image image-1" height="485" src="https://community.qlik.com/legacyfs/online/212924_T.PNG" style="border-width: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;" width="1243" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Now since the data is huge i just loaded one key.. Now for this particular key we have an install flag.. So whenever we have install flag as 1 the next row in the age should be starting from 1 and then goes on..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;For example in the attached qvw we have install flag for &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Calendar_Month_Code 2013-12 and &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Technical_Start_Date 2000-09, So till there we can see age as 160 and now from next row i.e. 2014-01 the age should starts from 1.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Can you please tell me how can i do it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Attached qvw for reference&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Bharat&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105206#M758378</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105207#M758379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;try something like this &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;T:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Equipment,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System_Code,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Calendar_Month_Code,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Contract,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Warranty,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Installation,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UnResolved,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [T&amp;amp;M],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Part Group],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key_EMS,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Install_Flag ,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Removal_Flag ,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Technical_Start_Date,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(previous(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Key_EMS&lt;/SPAN&gt;) &amp;lt;&amp;gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Key_EMS,&lt;/SPAN&gt;($(MonthDiff(Technical_Start_Date, Calendar_Month_Code))),&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Install_Flag =1,1,rangesum(peek('Age'),1)))&lt;/SPAN&gt; AS Age&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Resident Equipments_Details_final&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;order by &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Key_EMS,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Calendar_Month_Code;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 09:44:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105207#M758379</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2018-09-07T09:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105208#M758380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Liron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only thing is as of now from where i have install flag there it is showing as 1 but 1 should come from the next record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached image for more reference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="212951" alt="T.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/212951_T.PNG" style="height: 101px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Here in the image we have install flag at 2016-11&amp;nbsp; and 1998-06 in technical start date. Here the age is starting from 1 , but instead of this till where i have install flag as 1 till there it should me 222 and the next record i.e. 2016-12&amp;nbsp; and technical start date &lt;SPAN style="font-size: 13.3333px;"&gt;1998-06 from there it should start from 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Please let me know if you need anything more.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Bharat&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 10:15:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105208#M758380</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-09-07T10:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105209#M758381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ Sunny Bhai.. Can you please help..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 11:14:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105209#M758381</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-09-07T11:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105210#M758382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Piece of old code:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(Install_Flag =1,1,rangesum(peek('Age'),1))) AS Age&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Replace it with:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(Previous(Install_Flag) &amp;lt;&amp;gt; InstallFlag, 1, Rangesum(Peek('Age'),1))) as Age&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 12:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105210#M758382</guid>
      <dc:creator>Kalmer</dc:creator>
      <dc:date>2018-09-07T12:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105211#M758383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Kalmer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the problem is please see the below image:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="T.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/212967_T.PNG" style="height: 61px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Here where install flag is there till there&amp;nbsp; i need to get the aggregated one. So here in this case i am getting 1 but there is should get 222 then from next record i should get 1 which now i am getting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just if we can get that 222 value there then it will done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bharat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 12:29:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105211#M758383</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-09-07T12:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105212#M758384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Strange, the last piece of script should have fixed it.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;if(Previous(Install_Flag) &amp;lt;&amp;gt; InstallFlag, 1, Rangesum(Peek('Age'),1))) as Age&amp;nbsp; -&lt;/EM&gt;&lt;/SPAN&gt; As in, if last row was different from current row we start the Age.&lt;BR /&gt;&lt;STRONG&gt;Hmm try then (same row):&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;if(Previous(InstallFlag) = 1,&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;1,rangesum(peek('Age'),1))) AS Age&lt;/EM&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NP!&lt;BR /&gt;K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 12:39:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105212#M758384</guid>
      <dc:creator>Kalmer</dc:creator>
      <dc:date>2018-09-07T12:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105213#M758385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow.. this worked.. Thank you so much K.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But can you please tell me what will happen with the logic you have written.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 12:42:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105213#M758385</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-09-07T12:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105214#M758386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you mean in this Thread (&lt;A href="https://community.qlik.com/message/1543277"&gt;Re: Need to calculate Age&lt;/A&gt;), then it operates pretty much the same way.&lt;BR /&gt;But i guess we miss-spoke with the Install/Removal Flags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please put a link TO THIS POST in the post mentioned above in THIS comment. Also putting a "Correct" wouldn't harm me &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 12:47:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105214#M758386</guid>
      <dc:creator>Kalmer</dc:creator>
      <dc:date>2018-09-07T12:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105215#M758387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can i ask you one question please,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in this code i need to pass one more else condtion &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Previous(Key_EMS) &amp;lt;&amp;gt; Key_EMS,($(MonthDiff(Technical_Start_Date, Calendar_Month_Code))),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Previous(Install_Flag) = 1,1,rangesum(peek('Age'),1))) AS Age&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like where removal flag is 1 till there i need to get aggregated value and from the next row it should be 0 for all the remaining rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me how to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please don't mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bharat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 12:47:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105215#M758387</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-09-07T12:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105216#M758388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Done that..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 12:52:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105216#M758388</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-09-07T12:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105217#M758389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;BR /&gt;So old logic still continues, a new Condition needs to be added.&lt;BR /&gt;PS: as you can see i changed the Previous(Flag) = &lt;STRONG&gt;0&lt;/STRONG&gt;. I made the condition vice-versa.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; if(Previous(Key_EMS) &amp;lt;&amp;gt; Key_EMS,($(MonthDiff(Technical_Start_Date, Calendar_Month_Code))),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Previous(Install_Flag) = 0, rangesum(peek('Age'),1),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Previous(Removal_Flag) = 0, rangesum(peek('Age'),1), 1)))&amp;nbsp; AS Age&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 12:54:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105217#M758389</guid>
      <dc:creator>Kalmer</dc:creator>
      <dc:date>2018-09-07T12:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105218#M758390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry now for both flags i am getting continuous numbers.. even the earlier condition is not working...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:04:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105218#M758390</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-09-07T13:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105219#M758391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My mistake.&lt;/P&gt;&lt;P&gt;if(previous(Key_EMS) &amp;lt;&amp;gt; Key_EMS,($(MonthDiff(Technical_Start_Date, Calendar_Month_Code))),&lt;/P&gt;&lt;P&gt; if(Previous(Install_Flag) = 1 or Previous(Removal_Flag) = 1,1,rangesum(peek('Age'),1))) AS Age&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should do the trick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:11:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105219#M758391</guid>
      <dc:creator>Kalmer</dc:creator>
      <dc:date>2018-09-07T13:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105220#M758392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me try to explain more clearly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please see the below image&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="T.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/212989_T.PNG" style="height: 89px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;The install flag what you have given is perfectly working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now one more condition is that if you see in the above image i have removal flag so there i need to get accumulated value till where there is 1. And from next all records&amp;nbsp; should become 0. There shouldn't be any more numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if something is not clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bharat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:14:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105220#M758392</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-09-07T13:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105221#M758393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check my previous post, that should do it &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:18:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105221#M758393</guid>
      <dc:creator>Kalmer</dc:creator>
      <dc:date>2018-09-07T13:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105222#M758394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried with that one.Please see the below image:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="T.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/212990_T.PNG" style="height: 100px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;Here it 222 it is fine but from next i should get all 0 no more 1,2,3,.. and this should happen only for removal flag and not for install flag. Install flag is working perfectly fine..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:22:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105222#M758394</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-09-07T13:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105223#M758395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so let me get this straight:&lt;BR /&gt;IF the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Key_EMS changes, THEN we start from Month 1.&lt;BR /&gt;&lt;/SPAN&gt;IF the Key_EMS is the same and the Install_Flag changes, THEN we start from Month 1,&lt;BR /&gt;IF the Key_EMS is the same and the Removal Flag comes in, THEN all values from next row in the same KEY_EMS = 0 (since it was removed) ?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would do a preceeding load in here:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;if(Previous(Removal_Flag) = 1, 0, if(Previous(Peek('Age2')) = 0, 0, Rangesum(Peek('Age2'),1))) as Age2&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Previous(Key_EMS) &amp;lt;&amp;gt; Key_EMS,($(MonthDiff(Technical_Start_Date, Calendar_Month_Code))),&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(Previous(Install_Flag) = 1,1,rangesum(peek('Age'),1))) AS Age&lt;BR /&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 13:39:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105223#M758395</guid>
      <dc:creator>Kalmer</dc:creator>
      <dc:date>2018-09-07T13:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105224#M758396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI K,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have given the below expression in one table it-self:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Previous(Key_EMS) &amp;lt;&amp;gt; Key_EMS,($(MonthDiff(Technical_Start_Date, Calendar_Month_Code))),&lt;/P&gt;&lt;P&gt;if(Previous(Install_Flag) = 1,rangesum(peek('Age'),1),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Previous(Removal_Flag) = 1, 0, if(Previous(Peek('Age2')) = 0, 0, Rangesum(Peek('Age2'),1))))) as Age2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it is perfectly working fine. Is this correct right condition right or anything wrong..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 14:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105224#M758396</guid>
      <dc:creator>bharatkishore</dc:creator>
      <dc:date>2018-09-07T14:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Peek or Previous</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105225#M758397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i did not undestand this part "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Is this correct right condition right or anything wrong.."&lt;BR /&gt;&lt;/SPAN&gt;But as i understood it solved the problem.&lt;BR /&gt;Have good one!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2018 08:02:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-or-Previous/m-p/105225#M758397</guid>
      <dc:creator>Kalmer</dc:creator>
      <dc:date>2018-09-08T08:02:38Z</dc:date>
    </item>
  </channel>
</rss>

