<?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: Script Help - if then doing something in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096485#M941819</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;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET DateFormat='DD/MM/YYYY';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TDate, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="2003" data-containertype="14" data-objectid="200253" data-objecttype="1" href="https://community.qlik.com/thread/200253"&gt;https://community.qlik.com/thread/200253&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(html, codepage is 1252, embedded labels, table is @1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Status = 'Open', Amt,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(ID = Peek('ID'), Peek('Close_Amt'))) as Close_Amt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By ID, TDate;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/111754_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jan 2016 12:55:16 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-01-15T12:55:16Z</dc:date>
    <item>
      <title>Script Help - if then doing something</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096483#M941817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assume I have the following data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="268"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="19" width="64"&gt;ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;Status&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="76"&gt;TDate&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;Amt&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A01&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;15/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A02&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;13/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A03&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;28/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A04&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;20/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A01&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Close&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;14/03/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A02&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;18/03/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;79&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A04&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Close&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;18/03/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;Now, I need to do if the status is close then I need take the Amt from last month, else take Amt as a Close_Amt fro the particular ID(see following result).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is it possible to make it at script? How can I come out the result at scripting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 363px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="64"&gt;ID&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Status&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="76"&gt;TDate&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Amt&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="95"&gt;Close_Amt&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;A01&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;15/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #ff0000;"&gt;35&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;A02&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;13/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;40&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;A03&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;28/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;25&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;A04&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;20/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #ff0000;"&gt;99&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;99&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;A01&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Close&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;14/03/2015&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #ff0000;"&gt;35&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;A02&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;18/03/2015&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;79&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;79&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="19" style="border-top: none;"&gt;A04&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt;Close&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none; border-left: none;"&gt;18/03/2015&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;SPAN style="color: #ff0000;"&gt;99&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 09:48:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096483#M941817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-15T09:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help - if then doing something</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096484#M941818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is possible in the script. Make sure that it is sorted accordingly. &lt;BR /&gt;Just made this mockup for you,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Include_PC: &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Load * Inline [&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Date, IncludePC, Navn, Amt&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;40000, 6042, MAre, 100&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;40500, 6020, Hordaland,200&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;41000, 6042, MAre, ];&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;PC_MAP:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt; load &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Navn,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;IncludePC,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Amt as Amt_T,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Date,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if(isnull(Amt) or trim(Amt)='',peek('Amt'),Amt) as Amt&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;resident Include_PC order by IncludePC,Navn,Date ASC; &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;drop table Include_PC;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P&gt;You can either just rename the fields back in a resident, rename field or something like that as this produces 'Amt' and Amt_T. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or expand the If " for Close amt into something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PC_MAP:&lt;/P&gt;&lt;P&gt; load &lt;/P&gt;&lt;P&gt;Navn,&lt;/P&gt;&lt;P&gt;IncludePC,&lt;/P&gt;&lt;P&gt;Amt,&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;if(isnull(Amt) or trim(Amt)='',if(isnull(peek('Amt')) or trim(peek('Amt'))='', peek('Close_Amt'), peek('Amt')) ,Amt) as Close_Amt&lt;/P&gt;&lt;P&gt;//if(isnull(Amt) or trim(Amt)='',peek('Amt'),Amt) as Amt&lt;/P&gt;&lt;P&gt;resident Include_PC order by IncludePC,Navn,Date ASC; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Include_PC;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 12:40:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096484#M941818</guid>
      <dc:creator />
      <dc:date>2016-01-15T12:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help - if then doing something</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096485#M941819</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;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET DateFormat='DD/MM/YYYY';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TDate, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="2003" data-containertype="14" data-objectid="200253" data-objecttype="1" href="https://community.qlik.com/thread/200253"&gt;https://community.qlik.com/thread/200253&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(html, codepage is 1252, embedded labels, table is @1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Status = 'Open', Amt,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(ID = Peek('ID'), Peek('Close_Amt'))) as Close_Amt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By ID, TDate;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/111754_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 12:55:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096485#M941819</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-15T12:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help - if then doing something</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096486#M941820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ops, my last suggestion forgot a peek on ID/IncludePC in the if statement.&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Include_PC:&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * Inline [&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date, IncludePC, Navn, Amt&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;40000, 6042, MAre, 100&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;40500, 6020, Hordaland,200&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;41000, 6042, MAre, ];&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;Test:&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;Navn,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IncludePC,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Amt,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Date,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(isnull(Amt) or trim(Amt)='' and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;IncludePC=peek('IncludePC') &lt;/SPAN&gt;,if(isnull(peek('Amt')) or trim(peek('Amt'))='', peek('Close_Amt'), peek('Amt')) ,Amt) as Close_Amt&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;resident Include_PC order by IncludePC,Navn,Date ASC;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 13:08:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096486#M941820</guid>
      <dc:creator />
      <dc:date>2016-01-15T13:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help - if then doing something</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096487#M941821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;Try This.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set NullInterpret='';&lt;/P&gt;&lt;P&gt;TAB2:&lt;/P&gt;&lt;P&gt;//load ID,Status,TDate,Amt,if(Status='Open',Amt,)&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, Status, TDate, Amt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A01, Open, 15/02/2015, 35&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A02, Open, 13/02/2015, 40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A03, Open, 28/02/2015, 25&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A04, Open, 20/02/2015, 99&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A01, Close, 14/03/2015,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A02, Open, 18/03/2015, 79&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; A04, Close, 18/03/2015,&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TAB3:&lt;/P&gt;&lt;P&gt;load *,1 &lt;/P&gt;&lt;P&gt;resident TAB2&lt;/P&gt;&lt;P&gt;order by ID,TDate desc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load *,if(isnull(Amt),peek('Amt',-1),Amt) as NAmt&lt;/P&gt;&lt;P&gt;Resident TAB3;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table TAB2,TAB3;&lt;/P&gt;&lt;P&gt;drop field 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/111762_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 14:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096487#M941821</guid>
      <dc:creator />
      <dc:date>2016-01-15T14:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help - if then doing something</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096488#M941822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I' sorry.My user gt slightly change the requirement. He wan only show the last month amt when then status equal to close. Like following. Gt any idea to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 363px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="19" width="64"&gt;ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;Status&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="76"&gt;TDate&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;Amt&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="95"&gt;Close_Amt&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A01&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;15/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;35&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A02&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;13/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;40&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A03&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;28/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;25&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A04&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;20/02/2015&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;99&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A01&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Close&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;14/03/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A02&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Open&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;18/03/2015&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;79&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" style="border-top: none;"&gt;A04&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Close&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;18/03/2015&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;99&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 14:18:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096488#M941822</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-15T14:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help - if then doing something</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096489#M941823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wong, couple of questions before answer your question ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; In your source data, do you have more than &lt;STRONG&gt;one row&lt;/STRONG&gt; for previous month &amp;amp; current Month on ID and status combination? If Yes, you need write complex script to get out of this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 14:42:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096489#M941823</guid>
      <dc:creator />
      <dc:date>2016-01-15T14:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help - if then doing something</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096490#M941824</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;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD ID, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TDate, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="2003" data-containertype="14" data-objectid="200253" data-objecttype="1" href="https://community.qlik.com/thread/200253"&gt;https://community.qlik.com/thread/200253&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(html, codepage is 1252, embedded labels, table is @1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FinalTable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Status = 'Close' and ID = Peek('ID'), Peek('Amt')) as Close_Amt&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Order By ID, TDate;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table Table;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 17:55:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096490#M941824</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-15T17:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Script Help - if then doing something</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096491#M941825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dathu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There has only one record for previous month and current month on ID and status. I fond the answer to to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2016 08:09:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Help-if-then-doing-something/m-p/1096491#M941825</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-19T08:09:59Z</dc:date>
    </item>
  </channel>
</rss>

