<?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: Expression which evaluates rows two at a time in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-which-evaluates-rows-two-at-a-time/m-p/279439#M103984</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you could simply load all the IDs with the choosen username, and then use InnerJoin to just filter all the Unique IDs which doesnt have those username.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MainTable:&lt;/P&gt;&lt;P&gt;Load * From Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join Load&lt;/P&gt;&lt;P&gt;UniqueId&lt;/P&gt;&lt;P&gt;from Table where not isnull(User);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jan 2012 17:25:33 GMT</pubDate>
    <dc:creator>lucas4bi</dc:creator>
    <dc:date>2012-01-16T17:25:33Z</dc:date>
    <item>
      <title>Expression which evaluates rows two at a time</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-which-evaluates-rows-two-at-a-time/m-p/279436#M103981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a strange problem which I don't have a solution to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table which is organised by a unique ID. Each two rows in the table are actually two sides of the same transaction, so when organised by the ID field, consecutive rows relate to the same transaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is also a username field in the table. I would like to filter the existing table so that only a certain list uf usernames appear. But I would like to be able to include both rows of the transaction if one of the usernames to be filtered appears in &lt;EM&gt;either &lt;/EM&gt;row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume this would involve a loop which takes two rows into consideration upon each iteration? Or is there an existing operator which may also provide functionality to step through a table two rows at a time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 15:28:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-which-evaluates-rows-two-at-a-time/m-p/279436#M103981</guid>
      <dc:creator />
      <dc:date>2012-01-16T15:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Expression which evaluates rows two at a time</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-which-evaluates-rows-two-at-a-time/m-p/279437#M103982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post some lines of INLINE data sample?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want to filter in the script or in the front end?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can use a set expression with a search string to filter IDs with matching Usernames in the front end, but not very clear about it yet. Would be nice to have something to play with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;Created and attached a sample. The expression could just be like&lt;/P&gt;&lt;P&gt;=only({&amp;lt;ID= p(),UserName= &amp;gt;} UserName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 15:46:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-which-evaluates-rows-two-at-a-time/m-p/279437#M103982</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-01-16T15:46:25Z</dc:date>
    </item>
    <item>
      <title>Expression which evaluates rows two at a time</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-which-evaluates-rows-two-at-a-time/m-p/279438#M103983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; &lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;&lt;SPAN style="line-height: 115%; color: #000000; font-size: 10pt; font-family: Calibri;"&gt;I would create a data model that fits your double-record table. If I understand you correctly, two records have the same “UniqueID”? If so, the following script would do what you want.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;OriginalTable:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: blue; font-size: 10pt; font-family: &amp;amp;quot;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; &lt;BR /&gt; &lt;SPAN style="mso-tab-count: 1;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;UniqueID&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;&lt;SPAN style=": ; Courier New&amp;amp;quot: ; color: black; font-size: 10pt; font-family: &amp;amp;quot; mso-tab-count: 1;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;User&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;TempUser&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;&lt;BR /&gt; &lt;SPAN style="mso-tab-count: 1;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; SourceTable ;&lt;BR /&gt; &lt;SPAN style="mso-spacerun: yes;"&gt; &lt;/SPAN&gt;&lt;BR /&gt; Users:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: blue; font-size: 10pt; font-family: &amp;amp;quot;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;distinct&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;&lt;BR /&gt; &lt;SPAN style="mso-tab-count: 1;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;UniqueID&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;,&lt;BR /&gt; &lt;SPAN style="mso-tab-count: 1;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;TempUser&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;User&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;&lt;BR /&gt; &lt;SPAN style="mso-tab-count: 1;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;resident&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; OriginalTable;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: blue; font-size: 10pt; font-family: &amp;amp;quot;"&gt;Drop&lt;/STRONG&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;Field&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;TempUser&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: Calibri;"&gt;An alternative definition for the record pairs could be &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;Div&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;recno&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;(),2) &lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 10pt;"&gt;PairID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Calibri;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;. This way, you would indeed see all records belonging to pairs that pertain to a specific user.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 16:01:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-which-evaluates-rows-two-at-a-time/m-p/279438#M103983</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-01-16T16:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Expression which evaluates rows two at a time</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-which-evaluates-rows-two-at-a-time/m-p/279439#M103984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you could simply load all the IDs with the choosen username, and then use InnerJoin to just filter all the Unique IDs which doesnt have those username.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MainTable:&lt;/P&gt;&lt;P&gt;Load * From Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join Load&lt;/P&gt;&lt;P&gt;UniqueId&lt;/P&gt;&lt;P&gt;from Table where not isnull(User);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 17:25:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-which-evaluates-rows-two-at-a-time/m-p/279439#M103984</guid>
      <dc:creator>lucas4bi</dc:creator>
      <dc:date>2012-01-16T17:25:33Z</dc:date>
    </item>
  </channel>
</rss>

