<?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: QV scripting join,exists or other solution ? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046819#M351846</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert, thanks a lot for your help !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wasn't enough explicit, your second solution works (Lucian's solution too), but there is no comparaison between date, here it works thanks to the sort of data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I : make something to sort data according to the date, or add a condition on LOSE DATE &amp;lt; WIN DATE ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again to both of your for your precious (and very fast!) advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Mar 2016 10:22:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-03-10T10:22:22Z</dc:date>
    <item>
      <title>QV scripting join,exists or other solution ?</title>
      <link>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046815#M351842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Everybody !&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I need to do something in QV Scripting because of restriction with database.&lt;/DIV&gt;&lt;DIV&gt;I created this sample data to explain my issue.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I'm searching for an elegant way to detect teams that lost a game and then win one. (In my example, only SG is supposed to match this condition)&lt;/DIV&gt;&lt;DIV&gt;Thanks &lt;STRONG&gt;a lot&lt;/STRONG&gt; for your help !&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;SAMPLE_DATA:&lt;/DIV&gt;&lt;DIV&gt;Load * inline&lt;/DIV&gt;&lt;DIV&gt;[&lt;/DIV&gt;&lt;DIV&gt;RESULT,DATE_RESULT,TEAM&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #339966;"&gt;WIN,01/01/2016,SG&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #339966;"&gt;LOOSE,02/01/2016,SG&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;WIN,03/01/2016,SG&lt;/DIV&gt;&lt;DIV&gt;NUL,04/01/2016,SG&lt;/DIV&gt;&lt;DIV&gt;WIN,01/01/2016,EAL&lt;/DIV&gt;&lt;DIV&gt;LOOSE,02/01/2016,EAL&lt;/DIV&gt;&lt;DIV&gt;NUL,04/01/2016,EAL&lt;/DIV&gt;&lt;DIV&gt;LOOSE,06/01/2016,SEA&lt;/DIV&gt;&lt;DIV&gt;LOOSE,07/01/2016,SEA&lt;/DIV&gt;&lt;DIV&gt;LOOSE,02/01/2016,SEA&lt;/DIV&gt;&lt;DIV&gt;NUL,03/01/2016,SEA&lt;/DIV&gt;&lt;DIV&gt;LOOSE,05/01/2016,SEA&lt;/DIV&gt;&lt;DIV&gt;LOOSE,06/01/2016,LLE&lt;/DIV&gt;&lt;DIV&gt;LOOSE,07/01/2016,LLE&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;];&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 09:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046815#M351842</guid>
      <dc:creator />
      <dc:date>2016-03-10T09:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: QV scripting join,exists or other solution ?</title>
      <link>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046816#M351843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, first of all is LOSE, not LOOSE. Use peek() to check the previous record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *, if( peek('RESULT') = 'LOSE' and RESULT = 'WIN', 'We have a match', '') as CheckPoint&lt;/P&gt;&lt;P&gt;RESIDENT SAMPLE_DATA;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 09:40:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046816#M351843</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2016-03-10T09:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: QV scripting join,exists or other solution ?</title>
      <link>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046817#M351844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAMPLE_DATA:&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; If(Previous(TEAM)=TEAM and RESULT='WIN' and Previous(RESULT)='LOOSE',1,0) as WinAfterLoose &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;INLINE [&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="line-height: 1.5em;"&gt;RESULT,DATE_RESULT,TEAM&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-family: inherit; color: #339966;"&gt;WIN,01/01/2016,SG&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-family: inherit; color: #339966;"&gt;LOOSE,02/01/2016,SG&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;WIN,03/01/2016,SG&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NUL,04/01/2016,SG&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WIN,01/01/2016,EAL&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOOSE,02/01/2016,EAL&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NUL,04/01/2016,EAL&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOOSE,06/01/2016,SEA&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOOSE,07/01/2016,SEA&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOOSE,02/01/2016,SEA&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NUL,03/01/2016,SEA&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOOSE,05/01/2016,SEA&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOOSE,06/01/2016,LLE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOOSE,07/01/2016,LLE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;];&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Or perhaps &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-size: 13.3333px;"&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-size: 13.3333px;"&gt;SAMPLE_DATA:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESULT &amp;amp; '|' &amp;amp; TEAM as KEY,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(RESULT='WIN' and Exists(KEY, 'LOOSE' &amp;amp; '|' &amp;amp; TEAM),1,0) as WinAfterAnyLoose&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;RESULT,DATE_RESULT,TEAM&lt;/P&gt;&lt;P&gt;WIN,01/01/2016,SG&lt;/P&gt;&lt;P&gt;LOOSE,02/01/2016,SG&lt;/P&gt;&lt;P&gt;WIN,03/01/2016,SG&lt;/P&gt;&lt;P&gt;NUL,04/01/2016,SG&lt;/P&gt;&lt;P&gt;WIN,01/01/2016,EAL&lt;/P&gt;&lt;P&gt;LOOSE,02/01/2016,EAL&lt;/P&gt;&lt;P&gt;NUL,04/01/2016,EAL&lt;/P&gt;&lt;P&gt;LOOSE,06/01/2016,SEA&lt;/P&gt;&lt;P&gt;LOOSE,07/01/2016,SEA&lt;/P&gt;&lt;P&gt;LOOSE,02/01/2016,SEA&lt;/P&gt;&lt;P&gt;NUL,03/01/2016,SEA&lt;/P&gt;&lt;P&gt;LOOSE,05/01/2016,SEA&lt;/P&gt;&lt;P&gt;LOOSE,06/01/2016,LLE&lt;/P&gt;&lt;P&gt;LOOSE,07/01/2016,LLE&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 09:47:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046817#M351844</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-10T09:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: QV scripting join,exists or other solution ?</title>
      <link>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046818#M351845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lucian, thanks a lot for your help and sorry about my English &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; . ( I'm currently working on it !).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm gonna post a reply to both Gysbert &amp;amp; you ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 10:14:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046818#M351845</guid>
      <dc:creator />
      <dc:date>2016-03-10T10:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: QV scripting join,exists or other solution ?</title>
      <link>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046819#M351846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert, thanks a lot for your help !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wasn't enough explicit, your second solution works (Lucian's solution too), but there is no comparaison between date, here it works thanks to the sort of data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I : make something to sort data according to the date, or add a condition on LOSE DATE &amp;lt; WIN DATE ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again to both of your for your precious (and very fast!) advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 10:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046819#M351846</guid>
      <dc:creator />
      <dc:date>2016-03-10T10:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: QV scripting join,exists or other solution ?</title>
      <link>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046820#M351847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, sorting is important. Also checking if is the same team on the previous row (see Gysbert's code)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 10:57:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046820#M351847</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2016-03-10T10:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: QV scripting join,exists or other solution ?</title>
      <link>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046821#M351848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your data needs to be sorted so load it first in a temporary table and the use a resident load to sort the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD *&amp;nbsp; FROM:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result&lt;/P&gt;&lt;P&gt;LOAD *, ...calculations_here...&lt;/P&gt;&lt;P&gt;RESIDENT Temp&lt;/P&gt;&lt;P&gt;Order By TEAM, DATE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE Temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 10:59:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046821#M351848</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-10T10:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: QV scripting join,exists or other solution ?</title>
      <link>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046822#M351849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot guys, By concatenatining all information you provided, I'm now able to solve my problematic !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 08:04:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-scripting-join-exists-or-other-solution/m-p/1046822#M351849</guid>
      <dc:creator />
      <dc:date>2016-03-15T08:04:25Z</dc:date>
    </item>
  </channel>
</rss>

