<?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 Set analysis manipulation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-manipulation/m-p/145626#M505531</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a table like that :&lt;/P&gt;&lt;P&gt;items : "id_item,id_item_from,item_value"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;where :&lt;BR /&gt;- id_item is the item identifiant&lt;BR /&gt;- id_item_from represent the id_item of another item (it can be 0 if this item is not linked with an other item)&lt;BR /&gt;- item_value is the item value ^^&lt;BR /&gt;&lt;BR /&gt;I need to traverse items which have not a null id_item_from and then :&lt;/P&gt;&lt;P&gt;sums the "item_value" of the items which have an "id_item" who is in the list of "id_item_from"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; example :&lt;BR /&gt;id_item,id_item_from,item_value&lt;BR /&gt;1,0,5&lt;BR /&gt;2,0,6&lt;BR /&gt;3,1,9&lt;BR /&gt;4,2,3&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I should have&lt;BR /&gt;=&amp;gt; id_item : 3 which have id_item_from = 1 =&amp;gt; get the value : 5&lt;BR /&gt;=&amp;gt; id_item : 4 which have pour id_item_from = 2 =&amp;gt; get the value : 6&lt;BR /&gt;&lt;BR /&gt;Result : 5+6 = 11 &lt;IMG src="http://www.labdecisionnel.com/components/com_fireboard/template/default/images/english/emoticons/laughing.png" style="border: 0px none ; vertical-align: middle;" /&gt;&lt;BR /&gt;&lt;BR /&gt;I tried this :&lt;/P&gt;&lt;P&gt;&lt;CODE class="php"&gt;Sum({$&amp;lt;id_item={$(=id_item_from)}&amp;gt;} item_value)&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's wrong because "$(=id_item_from)" is the "current" selection ... not the corresponding "id_item_from" of the current traversing "id_item" ...&lt;/P&gt;&lt;P&gt;Any solution ?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jun 2009 21:00:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-06-02T21:00:55Z</dc:date>
    <item>
      <title>Set analysis manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-manipulation/m-p/145626#M505531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a table like that :&lt;/P&gt;&lt;P&gt;items : "id_item,id_item_from,item_value"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;where :&lt;BR /&gt;- id_item is the item identifiant&lt;BR /&gt;- id_item_from represent the id_item of another item (it can be 0 if this item is not linked with an other item)&lt;BR /&gt;- item_value is the item value ^^&lt;BR /&gt;&lt;BR /&gt;I need to traverse items which have not a null id_item_from and then :&lt;/P&gt;&lt;P&gt;sums the "item_value" of the items which have an "id_item" who is in the list of "id_item_from"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; example :&lt;BR /&gt;id_item,id_item_from,item_value&lt;BR /&gt;1,0,5&lt;BR /&gt;2,0,6&lt;BR /&gt;3,1,9&lt;BR /&gt;4,2,3&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I should have&lt;BR /&gt;=&amp;gt; id_item : 3 which have id_item_from = 1 =&amp;gt; get the value : 5&lt;BR /&gt;=&amp;gt; id_item : 4 which have pour id_item_from = 2 =&amp;gt; get the value : 6&lt;BR /&gt;&lt;BR /&gt;Result : 5+6 = 11 &lt;IMG src="http://www.labdecisionnel.com/components/com_fireboard/template/default/images/english/emoticons/laughing.png" style="border: 0px none ; vertical-align: middle;" /&gt;&lt;BR /&gt;&lt;BR /&gt;I tried this :&lt;/P&gt;&lt;P&gt;&lt;CODE class="php"&gt;Sum({$&amp;lt;id_item={$(=id_item_from)}&amp;gt;} item_value)&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's wrong because "$(=id_item_from)" is the "current" selection ... not the corresponding "id_item_from" of the current traversing "id_item" ...&lt;/P&gt;&lt;P&gt;Any solution ?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2009 21:00:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-manipulation/m-p/145626#M505531</guid>
      <dc:creator />
      <dc:date>2009-06-02T21:00:55Z</dc:date>
    </item>
    <item>
      <title>Set analysis manipulation</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-manipulation/m-p/145627#M505532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it OK to handle it in the script? You could join the table back to itself like this:&lt;/P&gt;&lt;P&gt;[Example]:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;id_item,id_item_from,item_value&lt;BR /&gt;1,0,5&lt;BR /&gt;2,0,6&lt;BR /&gt;3,1,9&lt;BR /&gt;4,2,3&lt;BR /&gt;];&lt;BR /&gt;LEFT JOIN LOAD&lt;BR /&gt; id_item as id_item_from&lt;BR /&gt;,item_value as item_value_from&lt;BR /&gt;RESIDENT [Example]&lt;BR /&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2009 04:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-manipulation/m-p/145627#M505532</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-06-03T04:41:33Z</dc:date>
    </item>
  </channel>
</rss>

