<?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 fieldvalue to 0 if field does not appear in reference list in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-fieldvalue-to-0-if-field-does-not-appear-in-reference-list/m-p/591817#M219424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;same problem as before in my previous post &lt;A href="https://community.qlik.com/thread/117125"&gt;Only consider fields from reference list in script run&lt;/A&gt;&lt;/P&gt;&lt;P&gt;that was answered correctly by swuehl, now I am facing the problem that I need to have the full list of products...so I need to set their value to 0&amp;nbsp; - maybe by multiplying the fields with zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I have a dataset with a range of about 300 Product-fields: e.g. OrderID, Product_A, Product_B, Product_C, Product_D.....&lt;/P&gt;&lt;P&gt;2) Before the script run, the user saves an Excel file with a reference list of which product fields should be included in the script run&lt;/P&gt;&lt;P&gt;3) The script loads the excel file (in attached example as an inline load) and the DataNow the problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Intended result: QlikView should set the Product fieldvalues to 0 if they shoudnt be considered due to the reference list. The reference list could be either a field list (multiple columns but with no value) or a list of values (one column and multiple rows) as it comes from a field export function from a previous QlikView app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;IMG alt="Capture3.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/58344_Capture3.PNG.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 May 2014 01:59:43 GMT</pubDate>
    <dc:creator>danieloberbilli</dc:creator>
    <dc:date>2014-05-05T01:59:43Z</dc:date>
    <item>
      <title>Set fieldvalue to 0 if field does not appear in reference list</title>
      <link>https://community.qlik.com/t5/QlikView/Set-fieldvalue-to-0-if-field-does-not-appear-in-reference-list/m-p/591817#M219424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;same problem as before in my previous post &lt;A href="https://community.qlik.com/thread/117125"&gt;Only consider fields from reference list in script run&lt;/A&gt;&lt;/P&gt;&lt;P&gt;that was answered correctly by swuehl, now I am facing the problem that I need to have the full list of products...so I need to set their value to 0&amp;nbsp; - maybe by multiplying the fields with zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I have a dataset with a range of about 300 Product-fields: e.g. OrderID, Product_A, Product_B, Product_C, Product_D.....&lt;/P&gt;&lt;P&gt;2) Before the script run, the user saves an Excel file with a reference list of which product fields should be included in the script run&lt;/P&gt;&lt;P&gt;3) The script loads the excel file (in attached example as an inline load) and the DataNow the problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Intended result: QlikView should set the Product fieldvalues to 0 if they shoudnt be considered due to the reference list. The reference list could be either a field list (multiple columns but with no value) or a list of values (one column and multiple rows) as it comes from a field export function from a previous QlikView app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;IMG alt="Capture3.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/58344_Capture3.PNG.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 01:59:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-fieldvalue-to-0-if-field-does-not-appear-in-reference-list/m-p/591817#M219424</guid>
      <dc:creator>danieloberbilli</dc:creator>
      <dc:date>2014-05-05T01:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set fieldvalue to 0 if field does not appear in reference list</title>
      <link>https://community.qlik.com/t5/QlikView/Set-fieldvalue-to-0-if-field-does-not-appear-in-reference-list/m-p/591818#M219425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would suggest two functions, CrossTable and Apply Map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference_Products_to_Include:&lt;/P&gt;&lt;P&gt;Mapping load&amp;nbsp; * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product,Qty&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_B,1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product_D,1&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataTMP:&lt;/P&gt;&lt;P&gt;CrossTable(Product, Data)&lt;/P&gt;&lt;P&gt;LOAD * FROM&lt;/P&gt;&lt;P&gt;&lt;Q&gt;&lt;/Q&gt;&lt;/P&gt;&lt;P&gt;(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('Reference_Products_to_Include',Product,0) as Data,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OrderID,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Product&lt;/P&gt;&lt;P&gt;resident DataTMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table DataTMP;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 May 2014 03:44:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-fieldvalue-to-0-if-field-does-not-appear-in-reference-list/m-p/591818#M219425</guid>
      <dc:creator />
      <dc:date>2014-05-05T03:44:32Z</dc:date>
    </item>
  </channel>
</rss>

