<?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 Function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528741#M598669</link>
    <description>&lt;P&gt;Please post your data as text rather than an image. Or upload a small sample with some data in it.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jan 2019 06:26:37 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2019-01-10T06:26:37Z</dc:date>
    <item>
      <title>Peek Function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528720#M598668</link>
      <description>&lt;P&gt;Hi Friends&lt;/P&gt;&lt;P&gt;I have following data set in my Qv Document&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Data set" style="width: 153px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3497i25B989722AAA7325/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="Data set" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Data set&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After running the following script I get the output shown below&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;IF(PEEK('CRT_REF_2')=CRT_REF_2 and peek('CRF')='A','V','NV')AS VFLG&lt;BR /&gt;Resident CRE&amp;nbsp;&lt;BR /&gt;ORDER BY CRT_REF_2,CRF ASC;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Current output &amp;amp; expected out put" style="width: 423px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3498i9FF2DA1C318E56AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2.png" alt="Current output &amp;amp; expected out put" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Current output &amp;amp; expected out put&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;my&amp;nbsp; Expected output is shown next to current output.&lt;/P&gt;&lt;P&gt;My requirement is If there two or more records under same Ref_no&amp;nbsp; 'CRF'='B' should have V flag and&amp;nbsp; 'A' should have NV flag. If there exists only one record Flag should be V&amp;nbsp; irrespective of the CRF A or B&lt;/P&gt;&lt;P&gt;Kindly help me to modify my script to achieve my requirment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 05:45:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528720#M598668</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2019-01-10T05:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Peek Function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528741#M598669</link>
      <description>&lt;P&gt;Please post your data as text rather than an image. Or upload a small sample with some data in it.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 06:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528741#M598669</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-01-10T06:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Peek Function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528745#M598670</link>
      <description>&lt;P&gt;Possibly something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;If(Count(TOTAL &amp;lt;CRT_REF_2&amp;gt; CRF) &amp;gt; 1 And CRF = 'A', 'NV', 'V')&lt;/PRE&gt;&lt;P&gt;(assuming dimensions of&amp;nbsp;CRT_REF_2 and CRF)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 06:31:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528745#M598670</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-01-10T06:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Peek Function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528819#M598671</link>
      <description>&lt;P&gt;Thanks&amp;nbsp; Jonty,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with your expression and get following error&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.png" style="width: 503px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/3513iA81D3C8227236B59/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_1.png" alt="Screenshot_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have also attached sample data . Kindly advise me&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 09:03:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528819#M598671</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2019-01-10T09:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Peek Function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528833#M598672</link>
      <description>&lt;P&gt;Sorry&amp;nbsp;&lt;SPAN&gt;Jonty,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I got your reply wrong. What you have suggested is expression. I thought It is a script. When I use it as an Expression it works perfectly. But my requirement is to have&amp;nbsp; it it in data load script since I have to do further&amp;nbsp; modification in the same script. Further there are more than 2 million records and It takes lot of time for processing. Pls advise me a suitable data load script Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 09:40:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528833#M598672</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2019-01-10T09:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Peek Function</title>
      <link>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528842#M598673</link>
      <description>&lt;PRE&gt;aa:
LOAD CRT_REF_2, 
     CRF
From [D:\Qlikview\Lesson\data.xls]
(biff, embedded labels, table is Sheet1$);

Join(aa)
LOAD Count(CRT_REF_2) as Count_CRT_REF2,
	CRT_REF_2
Resident aa
Group By CRT_REF_2;

aaa:
LOAD
	*,
	If(Count_CRT_REF2 &amp;gt; 1 And CRF = 'A', 'NV', 'V') as VFLG
Resident aa;

DROP Table aa;&lt;/PRE&gt;&lt;P&gt;You might want to use more meaningful table names &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 09:57:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Peek-Function/m-p/1528842#M598673</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2019-01-10T09:57:49Z</dc:date>
    </item>
  </channel>
</rss>

