<?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: Referencing a value in a colum on another row using FieldValue / FieldIndex in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Referencing-a-value-in-a-colum-on-another-row-using-FieldValue/m-p/952211#M969337</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;I can return the FieldIndex as an integer in all rows successfully using this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FieldIndex ('nodeid_year',vAssetID&amp;amp;vYearOfInvest)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I extend to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FieldValue('value_after_Investment',FieldIndex('nodeid_year',vAssetID&amp;amp;vYearOfInvest))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It returns '-'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help gratefully received&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ross&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Sep 2015 16:37:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-29T16:37:19Z</dc:date>
    <item>
      <title>Referencing a value in a colum on another row using FieldValue / FieldIndex</title>
      <link>https://community.qlik.com/t5/QlikView/Referencing-a-value-in-a-colum-on-another-row-using-FieldValue/m-p/952210#M969336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use FieldValue with FieldIndex (in a straight table chart expression) to generate a new value field, populated with a value in a field on a different row - to generate a value after investment based on when the investment takes place.&amp;nbsp; I think in Excel I'd use Offset and&amp;nbsp; / or Index ...&lt;/P&gt;&lt;P&gt;The value then needs to restart based on when the investment is made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following fields:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; 'id' - 90+ unique values (user supplied value in a listbox captured in a variable vAssetID) - The 'id' is unique but repeats 25 times as its temporal data, with an investment value for each year beginning in 2015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'year'&amp;nbsp; - 1-2-1 link&amp;nbsp; to the 'value_before_investment' (same row combination of Id and year)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'investment_year'&amp;nbsp; - user supplied year of investment (an input box with variable attached vYearOfInvest)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'nodeid_year' - The unique element - the combination of id &amp;amp; year e.g. id E12T5 and year 2019 = E12T52019&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'value_before_Investment' - a list of values increasing with time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'value_after_Investment' - a usually but not always lower value after the investment is made - resets at the point of investment and begins increasing again over time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the kind of expression I'm trying to use (clearly not complete and doesn't restart the values in the new sequence in the row below):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; padding-left: 30px;"&gt;&lt;STRONG&gt;=if(nodeid_year =&amp;nbsp; vAssetID &amp;amp; vYearOfInvest, FieldValue('value_after_investment',FieldIndex('nodeid_year',vAssetID&amp;amp;vYearOfInvest)),value_before_investment)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problems / yet to be resolved:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I may be using these functions incorrectly as I can't get it to match the strings to match consistently in FieldValue / FieldIndex when concatenating values together (but they do match when comparing strings like for like in an expression),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the lookup values do match, and correct 'value_after_investment' is returned at the correct cell / row location, I then need to start the sequence going again from that point.&amp;nbsp; See graphic below as an example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help gratefully received.&amp;nbsp; Please fire away with questions if any of this is unclear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ross&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Qlik_Community_Question_280915.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/100246_Qlik_Community_Question_280915.png" style="width: 620px; height: 436px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2015 15:30:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referencing-a-value-in-a-colum-on-another-row-using-FieldValue/m-p/952210#M969336</guid>
      <dc:creator />
      <dc:date>2015-09-28T15:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing a value in a colum on another row using FieldValue / FieldIndex</title>
      <link>https://community.qlik.com/t5/QlikView/Referencing-a-value-in-a-colum-on-another-row-using-FieldValue/m-p/952211#M969337</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;I can return the FieldIndex as an integer in all rows successfully using this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FieldIndex ('nodeid_year',vAssetID&amp;amp;vYearOfInvest)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I extend to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FieldValue('value_after_Investment',FieldIndex('nodeid_year',vAssetID&amp;amp;vYearOfInvest))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It returns '-'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help gratefully received&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ross&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 16:37:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referencing-a-value-in-a-colum-on-another-row-using-FieldValue/m-p/952211#M969337</guid>
      <dc:creator />
      <dc:date>2015-09-29T16:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing a value in a colum on another row using FieldValue / FieldIndex</title>
      <link>https://community.qlik.com/t5/QlikView/Referencing-a-value-in-a-colum-on-another-row-using-FieldValue/m-p/952212#M969338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think that fieldvalue('field', fieldindex(number)) is the right approach for your task then it returned only distinct values in load-order and is completely independent from structures within a table-chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you will need inter-record functions like above(), below(), top(), bottom(), ... and/or some kind of lookup with pick(match()).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2015 23:58:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Referencing-a-value-in-a-colum-on-another-row-using-FieldValue/m-p/952212#M969338</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-09-29T23:58:05Z</dc:date>
    </item>
  </channel>
</rss>

