<?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: Binary Load then Reduce Data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291716#M707799</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to the reference manual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Times New Roman;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;The following triggers are not to be used in the QlikView Server environment, since&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left" style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;they lack meaning or may cause unexpected results:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left" style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left" style="padding-left: 60px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;OnPostReduceData&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;OnPostReload&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;On the other hand, I've been using OnOpen for years in the server environment despite a similar caution, and they only recently (?) updated the manual to indicate that OnOpen is now OK.&amp;nbsp; So maybe OnPostReload actually works.&lt;/SPAN&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;I'll give the trigger a shot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 Dec 2011 00:35:46 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-12-10T00:35:46Z</dc:date>
    <item>
      <title>Binary Load then Reduce Data</title>
      <link>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291714#M707797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the cleanest way of doing a binary load, then automatically making selections and reducing the data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an application that needs the complicated data model from another application, but only a small fraction of the data based on some simple selections.&amp;nbsp; I solved the problem by reducing my data with a sequence of inner joins, like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Products])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD 'TFS' as "Product Group"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUTOGENERATE 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Date Types])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD 'Int Yields Plus Open TFS Batch' as "Date Type" AUTOGENERATE 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Show Weights In]) LOAD dual('Tons',2000) as "Show Weights In"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUTOGENERATE 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Yields])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Product"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [Products];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Defect])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Loss Reason Code" RESIDENT [Yields];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Locations])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Location"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [Yields];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Dates by Type])&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Recno"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [Yields];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Dates by Type])&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Date Type Number" RESIDENT [Date Types];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Calendar])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Date"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [Dates by Type];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works just fine, but it just seems like it shouldn't be this complicated given the various ways QlikView has of reducing data based on selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Written as a macro, I believe it would be this simpler and probably faster code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sub ReduceData()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; activedocument.fields("Product Group").select "TFS"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; activedocument.fields("Date Type").select "Int Yields Plus Open TFS Batch"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; activedocument.fields("Show Weights In").select "Tons"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; activedocument.reducedata&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But I can't run a macro OnPostReload in a server environment.&amp;nbsp; I can supposedly execute a function during script execution, but that didn't work.&amp;nbsp; I assume that's because none of the logic in the macro above makes any sense until the final data model has been built, so after script execution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can do a reduction using Publisher, but only the distributed file would be reduced.&amp;nbsp; Explaining why this isn't good enough will take a little more detail.&amp;nbsp; The full set of data is huge, reloads daily, and takes 5-10 minutes to binary load.&amp;nbsp; My final user application requires additional QVDs that are refreshed hourly, so it must reload hourly.&amp;nbsp; I can't afford to binary load for 5-10 minutes every hour.&amp;nbsp; Instead, I have a middle QVW that loads daily after the huge data model, and does the reduction.&amp;nbsp; Then the user application is only binary loading a small file hourly.&amp;nbsp; It could not (?) binary load from the distributed file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could write all the original data model's tables out as QVDs, then do a bunch of where exists() loads, but that seems at least as complicated as the inner joins, plus keeps an extra copy of some very large tables of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a cleaner way to reduce my data?&amp;nbsp; Or are inner joins as good as it gets?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2011 20:08:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291714#M707797</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-12-09T20:08:19Z</dc:date>
    </item>
    <item>
      <title>Binary Load then Reduce Data</title>
      <link>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291715#M707798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've never tried it in the server environment, so it's more of a guess... I believe if you replace the macro with Actions and trigger them using "OnPostReload" event, you might be able to make your selections. Then, maybe you can fire another trigger by making a selection in a certain field and having a macro triggered off that selection, to actually perform the data reduction...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;again, never tried it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;good luck!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2011 00:15:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291715#M707798</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2011-12-10T00:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Load then Reduce Data</title>
      <link>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291716#M707799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;According to the reference manual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Times New Roman;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P align="left" style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;The following triggers are not to be used in the QlikView Server environment, since&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left" style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;they lack meaning or may cause unexpected results:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left" style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P align="left" style="padding-left: 60px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;OnPostReduceData&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;OnPostReload&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;On the other hand, I've been using OnOpen for years in the server environment despite a similar caution, and they only recently (?) updated the manual to indicate that OnOpen is now OK.&amp;nbsp; So maybe OnPostReload actually works.&lt;/SPAN&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;I'll give the trigger a shot.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2011 00:35:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291716#M707799</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-12-10T00:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Load then Reduce Data</title>
      <link>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291717#M707800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John is correct.&lt;/P&gt;&lt;P&gt; the workaround I use a lot is ...&lt;/P&gt;&lt;P&gt;when I need to run macros on post reload y use the windows task manager using the command line reload and it works perfect!!!I hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2011 00:41:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291717#M707800</guid>
      <dc:creator>hectorgarcia</dc:creator>
      <dc:date>2011-12-10T00:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Load then Reduce Data</title>
      <link>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291718#M707801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bump. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John I am dealing with a very similar issue now. What did you end up doing in this regard? Are you still using OnOpen? Or are inner joins my best bet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 17:37:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291718#M707801</guid>
      <dc:creator />
      <dc:date>2012-12-12T17:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Load then Reduce Data</title>
      <link>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291719#M707802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't say for sure what your best bet will be, but I ultimately stuck with the inner joins.&amp;nbsp; I worked on a script to use an inline table to control the joins, but just writing them out ended up being simpler.&amp;nbsp; Here's the whole actual script, comments included:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;BINARY ..\Yields\Yields.qvw;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// This application only exists to support TFSYieldsAndInventory, which will binary load from it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// The Yields binary load and then trimming it down for TFS integrated yields takes several minutes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// of time, which isn't something we want to do every hour.&amp;nbsp; So instead, we'll load TFSYields nightly,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// and then the real application can do a binary load from there hourly.&amp;nbsp; Since all the time is in the binary load, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// the normal duration calulation would be inaccurate.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DROP TABLES&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; [Show Coating In]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Threads]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Loss Reason Group]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Field View]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Fields on Report]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Dimensions]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Expressions]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Production]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Adjustment]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Non Prime]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,[Loss Analysis]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//LET dummy=ReduceData(); // NEED TO GET THIS WORKING BECAUSE IT IS *MUCH* SIMPLER&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// probably not working because fields and selection don't work until data model is complete&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// Reduce data to just TFS batch runs&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Products])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD 'TFS' as "Sheet / Tin / TFS / HRP"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUTOGENERATE 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Date Types])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD 'Int Yields Plus Open TFS Batch' as "Date Type" AUTOGENERATE 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Show Weights In]) LOAD dual('Tons',2000) as "Show Weights In"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AUTOGENERATE 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Yields])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Product"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [Products];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Defect])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Loss Reason Code" RESIDENT [Yields];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Locations])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Location"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [Yields];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Dates by Type])&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Recno"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [Yields];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Dates by Type])&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Date Type Number" RESIDENT [Date Types];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;INNER JOIN ([Calendar])&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD DISTINCT "Date"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [Dates by Type];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// On second thought, this whole loop approach is significantly more complicated than just writing them out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//[Links]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//LOAD concat(chr(39) &amp;amp; "From" &amp;amp; ',' &amp;amp; "To" &amp;amp; ',' &amp;amp; "Key" &amp;amp; chr(39),',',"Sequence") as "Links"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//LOAD *&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//,recno() as Sequence&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//INLINE [&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//From, To, Key&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//Products, Yields, Product&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//Yields, Defect, Loss Reason Code&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//Yields, Locations, Location&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//Yields, Dates by Type, Recno&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//Date Types, Dates by Type, Date Type Number&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//Dates by Type, Calendar, Date&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//LET vLinks = peek('Links');&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//DROP TABLE [Links];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//FOR EACH vLink IN $(vLinks)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vFrom = subfield(vLink,',',1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vTo&amp;nbsp;&amp;nbsp; = subfield(vLink,',',2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vKey&amp;nbsp; = subfield(vLink,',',3);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; INNER JOIN ([$(vTo)])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD DISTINCT "$(vKey)"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; RESIDENT [$(vFrom)];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//NEXT vLink&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;// Drop unnecessary fields&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DROP FIELDS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; "A1003?"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Activity Date"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;//,"Activity ID"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Activity Type"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Actual Gauge"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Actual Width"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Aim Gauge"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Aim Width"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Bill Payer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Catalog"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Charged Type"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Coating Weight"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Coil"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Coil Thread"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Consumption of Coating"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Cost Class"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Customer"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Customer Spec"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Customer Spec Desc"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Diverts Prime Reapplies"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Diverts Scrapped"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Diverts Secondary"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Diverts Secondary Reapplies"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Division"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Downgraded Coil Delay Minutes"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Downgraded Coil Feet"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Downgraded Coil Minutes"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Downgraded Coil Minutes with Delays"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Downgraded Coil Weight"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Downgraded Coils"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Line Consumption Feet"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Line Consumption of Coating"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Line Loss Line Scrap"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Line Loss Non Prime"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Line Loss Scrap"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Line Loss Scrapped Coils"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Line Production Feet"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Location Total"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Mill Source"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Minutes w/o Delays"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Non Prime Input Feet"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Non Prime Input of Coating"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Order Item"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Ordered Gauge"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Ordered Width"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Product Total"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Production Date"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Secondary Diverts Scrapped"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Secondary Diverts Upgrade"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Secondary Service Charge"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Secondary Service Charge Coating"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Secondary Write Offs"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Service Charge Coating"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Service Charge Divert to Non Prime"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Service Charge Line Scrap"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Service Charge Scrap Loss"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Service Charge Scrapped Coils"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Service Input of Coating"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Service Location"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Steel Grade"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Steel Type"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Temper"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Turns"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Write Offs Adds"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Write Offs Entry Rejects"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Write Offs Inactive"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,"Write Offs Weight Changes"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;And here's the macro I tried to get working, but didn't get working:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sub ReduceData()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; activedocument.fields("Product Group").select "TFS"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; activedocument.fields("Date Type").select "Int Yields Plus Open TFS Batch"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; activedocument.fields("Show Weights In").select "Tons"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; activedocument.reducedata&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 19:21:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291719#M707802</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2012-12-12T19:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Binary Load then Reduce Data</title>
      <link>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291720#M707803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simply put in Section Acces right after the binary load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Section Access;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACCESS, USERID, PASSWORD, NTNAME, YEAR&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADMIN, *, *, *, 2013&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Section Application;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ps. Dont forget to check initial datareduction in de doc prop. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 09:39:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Binary-Load-then-Reduce-Data/m-p/291720#M707803</guid>
      <dc:creator>victa001</dc:creator>
      <dc:date>2013-03-07T09:39:13Z</dc:date>
    </item>
  </channel>
</rss>

