<?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 Use previous loaded column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270030#M707489</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;you can use the function previous(field) or peek(field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings from Munich&lt;/P&gt;&lt;P&gt;Martina&lt;/P&gt;&lt;P&gt;EAVCO GmbH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Dec 2011 15:01:22 GMT</pubDate>
    <dc:creator>brenner_martina</dc:creator>
    <dc:date>2011-12-21T15:01:22Z</dc:date>
    <item>
      <title>Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270025#M707484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; When looping thru LOAD statement can I reuse a column? I need to so I can build a key. Source is on the web so the relation is a click on a link.&lt;/P&gt;&lt;P&gt;Some pseudo code to explain:&lt;BR /&gt;start loop 1&lt;BR /&gt;LOAD A,B,C&lt;BR /&gt;from source1&lt;BR /&gt;start loop 2&lt;BR /&gt;LOAD A,D,E&lt;BR /&gt;from source2&lt;BR /&gt;A in loop 2 should come from loop 1 The two load becomes two tables. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 19:12:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270025#M707484</guid>
      <dc:creator />
      <dc:date>2011-11-30T19:12:30Z</dc:date>
    </item>
    <item>
      <title>Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270026#M707485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if I understand, well, no, I am pretty sure i don't.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you say loop, are you talking about something like a for...next loop?&lt;/P&gt;&lt;P&gt;Then it would be interesting where you place your next statements, i.e. if the second loop is embedded into first or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand, column A is not coming from source2, so how is each record of column A related to the records of column D,E? Do you want it to be record number wise?&lt;/P&gt;&lt;P&gt;Then, you could maybe just use a recno() as column in both tables to link the two tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe a somewhat more concrete example would be of help (at least for my understanding).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2011 23:53:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270026#M707485</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-30T23:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270027#M707486</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;This is how I do it today, but I need to link teams and players. My suggestion were a nested for...loop but I can't get it to work.&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;for v_season= 1 to 44&lt;/P&gt;&lt;P&gt;IF Match($(v_season), 23, 25, 26, 27, 28, 29) = 0 THEN&lt;/P&gt;&lt;P&gt;teams:&lt;/P&gt;&lt;P&gt;LOAD Date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Game, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Result, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Result1 as PeriodResult, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Spectators, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Venue,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(v_season) as Säsong&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://domain.com?&amp;amp;qsSeasonId=$(v_season"&gt;http://domain.com?&amp;amp;qsSeasonId=$(v_season&lt;/A&gt;&lt;SPAN&gt;)];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;end if &lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set ErrorMode=0;&lt;/P&gt;&lt;P&gt;for season= 30 to 44&lt;/P&gt;&lt;P&gt;for match= 1 to 400&lt;/P&gt;&lt;P&gt;if $(match)&amp;lt;10 then&lt;/P&gt;&lt;P&gt;players:&lt;/P&gt;&lt;P&gt;LOAD @1 as pString,&lt;/P&gt;&lt;P&gt;$(season) as Season,&lt;/P&gt;&lt;P&gt;$(match) as Match&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://domain.com/history/gamefacts.asp?qsMatchnr=9000100$(match)&amp;amp;qsSeasonId=$(season"&gt;http://domain.com/history/gamefacts.asp?qsMatchnr=9000100$(match)&amp;amp;qsSeasonId=$(season&lt;/A&gt;&lt;SPAN&gt;)];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;elseif $(match)&amp;gt;10 and $(match)&amp;lt;100 then&lt;/P&gt;&lt;P&gt;players:&lt;/P&gt;&lt;P&gt;LOAD @1 as pString,&lt;/P&gt;&lt;P&gt;$(season) as Season,&lt;/P&gt;&lt;P&gt;$(match) as Match&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://domain.com/history/gamefacts.asp?qsMatchnr=900010$(match)&amp;amp;qsSeasonId=$(season"&gt;http://domain.com/history/gamefacts.asp?qsMatchnr=900010$(match)&amp;amp;qsSeasonId=$(season&lt;/A&gt;&lt;SPAN&gt;)];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;players:&lt;/P&gt;&lt;P&gt;LOAD @1 as pString,&lt;/P&gt;&lt;P&gt;$(season) as Season,&lt;/P&gt;&lt;P&gt;$(match) as Match&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://domain.com/history/gamefacts.asp?qsMatchnr=90001$(match)&amp;amp;qsSeasonId=$(season"&gt;http://domain.com/history/gamefacts.asp?qsMatchnr=90001$(match)&amp;amp;qsSeasonId=$(season&lt;/A&gt;&lt;SPAN&gt;)];;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 12:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270027#M707486</guid>
      <dc:creator />
      <dc:date>2011-12-21T12:38:08Z</dc:date>
    </item>
    <item>
      <title>Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270028#M707487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you should use an outer loop for your first table, and use the &lt;STRONG&gt;peek &lt;/STRONG&gt;function.&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD A,B,C&lt;/P&gt;&lt;P&gt;from source1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let nMax=NoOfRows('source1')-1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for n=0 to $(nMax)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Let vA=peek('A',$(n),'source1');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD $(vA) As A,D,E&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from source2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but to me it seems you need some kind of where condition loading from source2 so you only connect where a connection should really be made.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 13:05:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270028#M707487</guid>
      <dc:creator>gandalfgray</dc:creator>
      <dc:date>2011-12-21T13:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270029#M707488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it seems to me that you are only using the if-else statements in your last script part to get the URL query format in your Web file load correct. I think this can be done without the if-else:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your current code is similar to (I just simulated the query building as a field value):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for match= 1 to 400&lt;/P&gt;&lt;P&gt;if $(match)&amp;lt;10 then&lt;/P&gt;&lt;P&gt;players:&lt;/P&gt;&lt;P&gt;LOAD '9000100$(match)' as pString AutoGenerate 1;&lt;/P&gt;&lt;P&gt;elseif $(match)&amp;gt;=10 and $(match)&amp;lt;100 then&lt;/P&gt;&lt;P&gt;players:&lt;/P&gt;&lt;P&gt;LOAD '900010$(match)' as pString AutoGenerate 1;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;players:&lt;/P&gt;&lt;P&gt;LOAD '90001$(match)' as pString AutoGenerate 1;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I think the format can be forced by the use of num function: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for match2= 1 to 400&lt;/P&gt;&lt;P&gt;let vMatchText = num($(match2),'000');&lt;/P&gt;&lt;P&gt;players2:&lt;/P&gt;&lt;P&gt;LOAD '90001$(vMatchText)' as pString2&lt;/P&gt;&lt;P&gt; AutoGenerate 1;&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 14:59:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270029#M707488</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-21T14:59:34Z</dc:date>
    </item>
    <item>
      <title>Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270030#M707489</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;you can use the function previous(field) or peek(field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings from Munich&lt;/P&gt;&lt;P&gt;Martina&lt;/P&gt;&lt;P&gt;EAVCO GmbH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 15:01:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270030#M707489</guid>
      <dc:creator>brenner_martina</dc:creator>
      <dc:date>2011-12-21T15:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270031#M707490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan, that made the script more readable.&lt;/P&gt;&lt;P&gt;BTW, why Autogererate 1 after each line?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 08:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270031#M707490</guid>
      <dc:creator />
      <dc:date>2011-12-22T08:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270032#M707491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Martina, previous and/or peek don't work since it's not the same table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 10:37:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270032#M707491</guid>
      <dc:creator />
      <dc:date>2011-12-22T10:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270033#M707492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas, you may use peek() also to retrieve values from a different table (use all 3 parameter):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor47"&gt;&lt;/A&gt;&lt;A name="peek"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;peek(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;fieldname [ , row [ , tablename ] ] &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;The proposed change to your load seems not to fix your initial issue, right? So could you explain a bit more detailed what you get when running your script and what you expect to get?&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;I noticed that your two tables teams and players don't share any common field names to link together. I am not sure what is appropriate, so it would be helpful if you could explain what the content of your two tables is and how you would like to link teams with players.&lt;/P&gt;&lt;P class="syntax"&gt;&lt;/P&gt;&lt;P class="syntax"&gt;Regards,&lt;/P&gt;&lt;P class="syntax"&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 12:04:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270033#M707492</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-22T12:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270034#M707493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan, correct - that was not my issue, but it was a good change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attaching a qvw with, parts of, the script.&lt;/P&gt;&lt;P&gt;You can follow the links to see the link.&lt;/P&gt;&lt;P&gt;I think I have to store tabel1 (Games) first and then loop through it somehow with a resident load to create the link to table2 (Players). A guess...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 15:03:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270034#M707493</guid>
      <dc:creator />
      <dc:date>2011-12-22T15:03:28Z</dc:date>
    </item>
    <item>
      <title>Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270035#M707494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thomas, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would first try to split your pString into appropriate fields. Honestly, I don't know what these fields would be. I had a short look at the web sites and try to figure out how we could link the tables based on what information pieces, but no luck up to now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I remember that you posted a question about splitting up something that looked like pString a few weeks ago, have you succeeded to apply your solution from that post to this application?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you tell us at what piece of information we need to look? What is making up a team / player? Or what would you like to analyze in detail?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am leaving office now, not sure if I have the chance to work on that for the next days, but I think any information might help also others to help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 16:00:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270035#M707494</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-22T16:00:42Z</dc:date>
    </item>
    <item>
      <title>Use previous loaded column</title>
      <link>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270036#M707495</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;in the data there are no way of linking. Maybe if we could make Date a variable from Games and reuse that in Player (together with Season). Splitting of the the string is in progress.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 17:04:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-previous-loaded-column/m-p/270036#M707495</guid>
      <dc:creator />
      <dc:date>2011-12-22T17:04:37Z</dc:date>
    </item>
  </channel>
</rss>

