<?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: creating a template in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/creating-a-template/m-p/529133#M197797</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;thanks for the help. i can see the logic behind it however it doesnt seem to work and i am not sure why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have amended the original message. maybe the additional code i included helps explain why it doesnt work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Sep 2013 10:44:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-09-17T10:44:50Z</dc:date>
    <item>
      <title>creating a template</title>
      <link>https://community.qlik.com/t5/QlikView/creating-a-template/m-p/529131#M197795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a database from which i am trying to retrieve data&amp;nbsp; and create a template. the template has the following structure.&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="width: 100%; border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;description &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;value&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;number of people in brazil&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1.1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;number of women in brazil&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;800&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1.2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;number of men in brazil&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;number of cars in brazil&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;09807&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to create this template I have written the following piece of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;tblDetails:&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;ID, desciption&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1, number of people&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1.1, number of women in brazil&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1.2, number if men in brazil&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2, number of cars in brazil&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tblTemplate:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;'1' as ID,&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[date if entry],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;count(people) as value&lt;/P&gt;&lt;P&gt;resident tblMaster&lt;/P&gt;&lt;P&gt;where country ='BRAZIL'&lt;/P&gt;&lt;P&gt;group by [date of entry]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;concatenate load&lt;/P&gt;&lt;P&gt;'1.1' as ID,&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[date of entry],&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;count(people) as value&lt;/P&gt;&lt;P&gt;where tblMaster&lt;/P&gt;&lt;P&gt;where country='BRAZIL' and gender='female'&lt;/P&gt;&lt;P&gt;group by [date of entry]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;ETC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this works fine until a certain ID has zero records because of its conditions (this cause the row to disappear from the straight table). My requirement is to display the row (as the template needs to be of a fixed format) and insert the value column as zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does any one know how i can do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 08:54:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/creating-a-template/m-p/529131#M197795</guid>
      <dc:creator />
      <dc:date>2013-09-17T08:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: creating a template</title>
      <link>https://community.qlik.com/t5/QlikView/creating-a-template/m-p/529132#M197796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add the end of the script you can load a set of default records for the missing id's&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate load * inline [&lt;/P&gt;&lt;P&gt;ID, description, value&lt;/P&gt;&lt;P&gt;1, number of people in brazil, 0&lt;/P&gt;&lt;P&gt;1.1, number of women in brazil, 0&lt;/P&gt;&lt;P&gt;1.2, number of men in brazil, 0&lt;/P&gt;&lt;P&gt;2, number of cars in brazil, 0&lt;/P&gt;&lt;P&gt;3, number of something in brazil, 0&lt;/P&gt;&lt;P&gt;3.1, number of something else in brazil, 0&lt;/P&gt;&lt;P&gt;....etc&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;where not exists(ID);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way only the records of the missing ID's will get loaded from the inline load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 09:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/creating-a-template/m-p/529132#M197796</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-09-17T09:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: creating a template</title>
      <link>https://community.qlik.com/t5/QlikView/creating-a-template/m-p/529133#M197797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;thanks for the help. i can see the logic behind it however it doesnt seem to work and i am not sure why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have amended the original message. maybe the additional code i included helps explain why it doesnt work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 10:44:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/creating-a-template/m-p/529133#M197797</guid>
      <dc:creator />
      <dc:date>2013-09-17T10:44:50Z</dc:date>
    </item>
  </channel>
</rss>

