<?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: Indicator using previous values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Indicator-using-previous-values/m-p/415201#M154442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rajni but I end up with fmonths exactly the same as PurchGT0?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2012 09:52:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-09-19T09:52:09Z</dc:date>
    <item>
      <title>Indicator using previous values</title>
      <link>https://community.qlik.com/t5/QlikView/Indicator-using-previous-values/m-p/415199#M154440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there.&amp;nbsp; I am struggling with something that I think is quite basic but cannot figure out.&amp;nbsp; I have had a look at the previous and peek functions, with no success.&amp;nbsp; What I would like is to create a new field called fmonth that looks at PurchGT0 and is like an ever indicator - i.e. if it becomes 1, it stays 1 for the rest of that ID value and then resets itself at the start of the next ID value.&amp;nbsp; The size of the data could change depending on the number of ID's and the number of months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TTable:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, Month, Purch, PurchGT0&lt;/P&gt;&lt;P&gt;1, 201201, 100, 1&lt;/P&gt;&lt;P&gt;1, 201202, 100, 1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;1, 201203, 0, 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1, 201204, 100, 1&lt;/P&gt;&lt;P&gt;1, 201205, 150, 1&lt;/P&gt;&lt;P&gt;1, 201206, 300, 1&lt;/P&gt;&lt;P&gt;2, 201201, 0, 0&lt;/P&gt;&lt;P&gt;2, 201202, 0, 0&lt;/P&gt;&lt;P&gt;2, 201203, 600, 1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;2, 201204, 0, 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;2, 201205, 0, 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2, 201206, 100, 1&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Desired outcome:&lt;/P&gt;&lt;P&gt;//ID, Month, Purch, PurchGT0, fmonth&lt;/P&gt;&lt;P&gt;//1, 201201, 100, 1,1&lt;/P&gt;&lt;P&gt;//1, 201202, 100, 1,1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;//1, 201203, 0, 0,&lt;SPAN style="color: #333333;"&gt;1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;//1, 201204, 100, 1,1&lt;/P&gt;&lt;P&gt;//1, 201205, 150, 1,1&lt;/P&gt;&lt;P&gt;//1, 201206, 300, 1,1&lt;/P&gt;&lt;P&gt;//2, 201201, 0, 0,0&lt;/P&gt;&lt;P&gt;//2, 201202, 0, 0,0&lt;/P&gt;&lt;P&gt;//2, 201203, 600, 1,1&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;//2, 201204, 0, 0,1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;//2, 201205, 0, 0,1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;//2, 201206, 100, 1,1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm stumped so any help would be massively appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2012 20:36:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Indicator-using-previous-values/m-p/415199#M154440</guid>
      <dc:creator />
      <dc:date>2012-09-17T20:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Indicator using previous values</title>
      <link>https://community.qlik.com/t5/QlikView/Indicator-using-previous-values/m-p/415200#M154441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use if(isnull(PurchGT0),peek(PurchGT0),PurchGT0) as fmonth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2012 05:56:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Indicator-using-previous-values/m-p/415200#M154441</guid>
      <dc:creator>rajni_batra</dc:creator>
      <dc:date>2012-09-18T05:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Indicator using previous values</title>
      <link>https://community.qlik.com/t5/QlikView/Indicator-using-previous-values/m-p/415201#M154442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rajni but I end up with fmonths exactly the same as PurchGT0?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2012 09:52:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Indicator-using-previous-values/m-p/415201#M154442</guid>
      <dc:creator />
      <dc:date>2012-09-19T09:52:09Z</dc:date>
    </item>
  </channel>
</rss>

