<?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 fill the missed fields during scriptload in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348976#M704249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi together,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a urgent problem and did not how i can handle it. Daily, I get a origin excel source document to load in qlikview. unfortunately, did&lt;/P&gt;&lt;P&gt;this excel document not contain all datarows that i need. In this case the following datarows are not listed ( look at my green highlited datarows )&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i fill the missed datarows during the scriptload ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excelsource:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="source.PNG" class="jive-image" src="https://community.qlik.com/legacyfs/online/14152_source.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is the target table that i want to build in qlikview:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="target.PNG" class="jive-image" src="https://community.qlik.com/legacyfs/online/14153_target.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am very grateful for a practical advice. An example would be nice. Thank you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;IMG id="smallDivTip" src="https://community.qlik.com/" style="z-index: 90; border: 0px solid blue; position: absolute; left: 219px; top: 96px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 May 2012 12:01:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-13T12:01:40Z</dc:date>
    <item>
      <title>fill the missed fields during scriptload</title>
      <link>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348976#M704249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi together,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a urgent problem and did not how i can handle it. Daily, I get a origin excel source document to load in qlikview. unfortunately, did&lt;/P&gt;&lt;P&gt;this excel document not contain all datarows that i need. In this case the following datarows are not listed ( look at my green highlited datarows )&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i fill the missed datarows during the scriptload ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excelsource:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="source.PNG" class="jive-image" src="https://community.qlik.com/legacyfs/online/14152_source.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this is the target table that i want to build in qlikview:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="target.PNG" class="jive-image" src="https://community.qlik.com/legacyfs/online/14153_target.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am very grateful for a practical advice. An example would be nice. Thank you !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;IMG id="smallDivTip" src="https://community.qlik.com/" style="z-index: 90; border: 0px solid blue; position: absolute; left: 219px; top: 96px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2012 12:01:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348976#M704249</guid>
      <dc:creator />
      <dc:date>2012-05-13T12:01:40Z</dc:date>
    </item>
    <item>
      <title>fill the missed fields during scriptload</title>
      <link>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348977#M704250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Honour,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make the inline table of the three rows and then concate that table with the your excelsource table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script will be as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load * from [Excelsource];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load * inline [&lt;/P&gt;&lt;P&gt;Product,country,quartal,year,value&lt;/P&gt;&lt;P&gt;alpha,france,1,2011,0&lt;/P&gt;&lt;P&gt;bravo,germany,2,2011,0&lt;/P&gt;&lt;P&gt;bravo,germany,4,2011,0&lt;/P&gt;&lt;P&gt;] &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nilesh Gangurde&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2012 12:16:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348977#M704250</guid>
      <dc:creator>nilesh_gangurde</dc:creator>
      <dc:date>2012-05-13T12:16:27Z</dc:date>
    </item>
    <item>
      <title>fill the missed fields during scriptload</title>
      <link>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348978#M704251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't know upfront which lines are missing, you could create a table with all possible combinations for Product/Country, Year and Quartal. Then join this table to your read in data and fill in the missing zeros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe like this (I create some dummy data first, since I can't easily copy your sample data from the bitmap image):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Create some sample data&lt;/P&gt;&lt;P&gt;&lt;EM&gt;INPUT:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;chr(65+floor(RAND()*4)) as Product,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;chr(65+floor(RAND()*4)) as Country,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ceil(RAND()*4) as Quarter,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2011+floor(RAND()*2) as Year,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ceil(RAND()*100) as Value&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;autogenerate 25;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Create a table with all possible combinations&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PRODUCTCOUNTRY:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD distinct Product, Country resident INPUT;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;join (PRODUCTCOUNTRY) load Distinct Year resident INPUT;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;join (PRODUCTCOUNTRY) load Distinct Quarter Resident INPUT;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//join the created table with the original data&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;left join (PRODUCTCOUNTRY) load * Resident INPUT;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;drop table INPUT;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;// fill in missing zeros&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RESULT:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;noconcatenate LOAD Product, Country, Year, Quarter, if(len(Value),Value,0) as Value Resident PRODUCTCOUNTRY order by Product, Country, Year, Quarter;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;drop table PRODUCTCOUNTRY;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2012 13:35:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348978#M704251</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-05-13T13:35:40Z</dc:date>
    </item>
    <item>
      <title>fill the missed fields during scriptload</title>
      <link>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348979#M704252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your advice. I think your example code is not scalability enough for my case. &lt;/P&gt;&lt;P&gt;&lt;SPAN id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;With thousands of&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;lines&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;that would be very&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;much&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;working &lt;/SPAN&gt;&lt;SPAN&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look the solution of swuehl. &lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;That&lt;/SPAN&gt;&lt;SPAN&gt;'s what I call&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;an smart solution. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG id="smallDivTip" src="https://community.qlik.com/" style="z-index: 90; border: 0px solid blue; position: absolute; left: 310px; top: 115px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2012 20:56:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348979#M704252</guid>
      <dc:creator />
      <dc:date>2012-05-13T20:56:59Z</dc:date>
    </item>
    <item>
      <title>fill the missed fields during scriptload</title>
      <link>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348980#M704253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you buddy ! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works perfectly. This peace of code i should note for it. aweful &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;IMG id="smallDivTip" src="https://community.qlik.com/" style="z-index: 90; border: 0px solid blue; position: absolute; left: 253px; top: 28px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 May 2012 20:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348980#M704253</guid>
      <dc:creator />
      <dc:date>2012-05-13T20:59:24Z</dc:date>
    </item>
    <item>
      <title>fill the missed fields during scriptload</title>
      <link>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348981#M704254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks honour I also learned something new... Thanxxx...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nilesh Gangurde&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 May 2012 05:38:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/fill-the-missed-fields-during-scriptload/m-p/348981#M704254</guid>
      <dc:creator>nilesh_gangurde</dc:creator>
      <dc:date>2012-05-14T05:38:18Z</dc:date>
    </item>
  </channel>
</rss>

