<?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: Combining information from previous tables in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552907#M685467</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;I would first try sort the issue with FieldF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load that table first and try sort out the issue with FieldF by using SUBFIELD()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FieldA,&lt;/P&gt;&lt;P&gt;SUBFIELD(FieldF,',') AS FieldF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM wherever.csv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Jan 2014 23:48:42 GMT</pubDate>
    <dc:creator>rustyfishbones</dc:creator>
    <dc:date>2014-01-03T23:48:42Z</dc:date>
    <item>
      <title>Combining information from previous tables in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552906#M685466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I'm not sure if this is possible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a simplified example of what tables my load script currently produces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1 (From File 1)&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;FieldA&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;FieldB&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 2 (From File 2)&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;FieldC&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;FieldD&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;FieldE&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;D1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;E1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;C2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;D2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;E2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to keep those tables but add this one as well:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;FieldA&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;FieldF&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C1+D1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C2+D2+E2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure how to do this or if it's possible.&amp;nbsp; Here's the load script I was playing with, but I can't figure out what I would put for the FROM section.&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;Load FieldA,&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;If(FieldA=A1, C1,&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(FieldA=A2, C1+D1,&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(FieldA=A3, C2+D2+E2)&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;) as FieldF&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't see concatenate or join working here since the FieldF is so erratic/illogical...&amp;nbsp; Can you pull from two resident tables or two files?&amp;nbsp; Or, am I missing the obvious, and there's an easy solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 23:27:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552906#M685466</guid>
      <dc:creator />
      <dc:date>2014-01-03T23:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Combining information from previous tables in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552907#M685467</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;I would first try sort the issue with FieldF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load that table first and try sort out the issue with FieldF by using SUBFIELD()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FieldA,&lt;/P&gt;&lt;P&gt;SUBFIELD(FieldF,',') AS FieldF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM wherever.csv&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 23:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552907#M685467</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2014-01-03T23:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Combining information from previous tables in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552908#M685468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you could post the sample App too that may help me understand the issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jan 2014 23:50:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552908#M685468</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2014-01-03T23:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Combining information from previous tables in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552909#M685469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for taking a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what you mean by subfields helping in this case.&amp;nbsp; However I attached a sample app that I hope will help explain better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the attached example, I'm looking to create the following table:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Product&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Cases&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Product1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1221263.5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;Product2&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;732930.9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Product3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;489965.6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Product4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;634&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Product5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;35665&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jan 2014 01:07:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552909#M685469</guid>
      <dc:creator />
      <dc:date>2014-01-04T01:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Combining information from previous tables in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552910#M685470</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;Each Table in Qlikview can only contain one common field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have 2 in each table, which is causing the creation of synthetic tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to Concatenate each Table into 1 Table and see what that result brings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jan 2014 02:19:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552910#M685470</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2014-01-04T02:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Combining information from previous tables in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552911#M685471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sophia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your goal is to create a table in the application, then try to use ValueList(), Pick(), and Match() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your dimension:&lt;/P&gt;&lt;P&gt;=ValueList('Product1', 'Product2', 'Product3', 'Product4', 'Product5')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your Expression:&lt;/P&gt;&lt;P&gt;pick(match(ValueList('Product1', 'Product2', 'Product3', 'Product4', 'Product5'), 'Product1', 'Product2', 'Product3', 'Product4', 'Product5'),&lt;/P&gt;&lt;P&gt;sum([Basic Product1 Cases]),&lt;/P&gt;&lt;P&gt;sum([Basic Product2 Cases])+sum([Mid Product2 Cases]),&lt;/P&gt;&lt;P&gt;sum([Basic Product3 Cases])+sum([Mid Product3 Cases])+sum([Premium Product3 Cases]),&lt;/P&gt;&lt;P&gt;sum([Product4 Cases]),&lt;/P&gt;&lt;P&gt;sum([Product5 Cases]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My solution is very crude but it works...&lt;/P&gt;&lt;P&gt;I used your script to create the tables and then concatenated all into one table.&lt;/P&gt;&lt;P&gt;Then Added fields as you described in your application.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Alt([Basic Product1 Cases], 0) as Product1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Alt([Basic Product2 Cases], 0) + Alt([Mid Product2 Cases], 0) as Product2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Alt([Basic Product3 Cases], 0) + Alt([Mid Product3 Cases], 0) + Alt([Premium Product3 Cases], 0) as Product3,&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Alt([Product4 Cases], 0) as Product4,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Alt([Product5 Cases], 0) as Product5&lt;/P&gt;&lt;P&gt;Then Created a Product Field and Cases using a for loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully this is what you wanted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jan 2014 04:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552911#M685471</guid>
      <dc:creator />
      <dc:date>2014-01-04T04:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Combining information from previous tables in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552912#M685472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all your help, the idea you uploaded works like a dream!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wound up creating a key that I added on to the end so I can input the actual product names so people who view the QVW understand it better.&amp;nbsp; I thought I'd share it in case anyone else can use it.&amp;nbsp; I added the bits in red.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i=1 to 5;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Support_Cases:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Product$(i)'&amp;nbsp;&amp;nbsp;&amp;nbsp; as &lt;SPAN style="color: #ff0000;"&gt;Product_Num&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product$(i)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as Cases&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident tmp_Support_Cases;&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;SPAN style="color: #ff0000;"&gt;Join Load * Inline [Product_Num, Product&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Product1, &amp;lt;REAL PRODUCT1 NAME&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Product2, &amp;lt;REAL PRODUCT2 NAME&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Product3, &amp;lt;REAL PRODUCT3 NAME&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Product4, &amp;lt;REAL PRODUCT4 NAME&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;Product5, &amp;lt;REAL PRODUCT5 NAME&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table tmp_Support_Cases;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 21:47:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combining-information-from-previous-tables-in-load-script/m-p/552912#M685472</guid>
      <dc:creator />
      <dc:date>2014-01-06T21:47:10Z</dc:date>
    </item>
  </channel>
</rss>

