<?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 Make a new table according to a template table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526550#M196759</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables like these:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="template.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/50835_template.png" /&gt;&lt;/P&gt;&lt;P&gt;and I want to get a new table according to the table2 in Script, so the table2 is just like a template table. What I want to get finally is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG41 03 A1 01 HQ&lt;/P&gt;&lt;P&gt;PG41 03 A2 01 HQ&lt;/P&gt;&lt;P&gt;PG42 03 A1 02 CN&lt;/P&gt;&lt;P&gt;PG42 03 A2 03 JP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want this in my script, actually the first four columns is CD_PLANT, CD_OFFICE, TX_BRAND, TX_CUSTOMER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the blank of the column BRAND or CUSTOMER in table2 means all TX_BRAND or all TX_CUSTOMER data fit the situation. So&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the fifth column what I want to get is the SUBSIDIARY of the table2. Every row in table1 will always find a template in table2 to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I hope I have clarified the problem. The attached file is the data what I have created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Dec 2013 07:38:45 GMT</pubDate>
    <dc:creator>uacg0009</dc:creator>
    <dc:date>2013-12-26T07:38:45Z</dc:date>
    <item>
      <title>Make a new table according to a template table</title>
      <link>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526550#M196759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables like these:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="template.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/50835_template.png" /&gt;&lt;/P&gt;&lt;P&gt;and I want to get a new table according to the table2 in Script, so the table2 is just like a template table. What I want to get finally is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG41 03 A1 01 HQ&lt;/P&gt;&lt;P&gt;PG41 03 A2 01 HQ&lt;/P&gt;&lt;P&gt;PG42 03 A1 02 CN&lt;/P&gt;&lt;P&gt;PG42 03 A2 03 JP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want this in my script, actually the first four columns is CD_PLANT, CD_OFFICE, TX_BRAND, TX_CUSTOMER&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the blank of the column BRAND or CUSTOMER in table2 means all TX_BRAND or all TX_CUSTOMER data fit the situation. So&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the fifth column what I want to get is the SUBSIDIARY of the table2. Every row in table1 will always find a template in table2 to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I hope I have clarified the problem. The attached file is the data what I have created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 07:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526550#M196759</guid>
      <dc:creator>uacg0009</dc:creator>
      <dc:date>2013-12-26T07:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Make a new table according to a template table</title>
      <link>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526551#M196760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just left join these 2 tables? Is this what you want for final result?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 08:30:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526551#M196760</guid>
      <dc:creator />
      <dc:date>2013-12-26T08:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Make a new table according to a template table</title>
      <link>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526552#M196761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you but that is not what I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have said that what I want for final result is data like this below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;PG41 03 A1 01 HQ&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;PG41 03 A2 01 HQ&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;PG42 03 A1 02 CN&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;PG42 03 A1 03 CN&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;the TX_SUBSIDIARY needs to change to one of the SUBSIDIARY according to the PLANT, OFFICE,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;BRAND,CUSTOMER in table2 and CD_PLANT, CD_OFFICE, TX_BRAND, TX_CUSTOMER match or not.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you have any problem pls tell me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 08:55:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526552#M196761</guid>
      <dc:creator>uacg0009</dc:creator>
      <dc:date>2013-12-26T08:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Make a new table according to a template table</title>
      <link>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526553#M196762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use different ApplyMap() function calls with different keys. This way you can nest from the most specific to the most general combination of fields. Attached you have an example, maybe not exactly the one you want but you can easily adapt it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 09:45:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526553#M196762</guid>
      <dc:creator />
      <dc:date>2013-12-26T09:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Make a new table according to a template table</title>
      <link>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526554#M196763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use ApplyMap:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map:&lt;/P&gt;&lt;P&gt;mapping Load PALNT, SUBSIDIARTY from T2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load *, ApplyMap('map',CD_PLANT,null()) as SUBSIDIARTY from T1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will map subsidiary field from T2 to T1. . .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2013 11:00:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526554#M196763</guid>
      <dc:creator>brijesh1991</dc:creator>
      <dc:date>2013-12-26T11:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Make a new table according to a template table</title>
      <link>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526555#M196764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the reply late and thank you, but the result is not what I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result what I want is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;PG41 03 A1 01 HQ&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;PG41 03 A2 01 HQ&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;PG42 03 A1 02 CN&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;PG42 03 A2 03 JP&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The fifth column(SUBSIDIARY) in new table should refer to BRAND and CUSTOMER in T2 in this example.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The blank value in column BRAND or CUSTOMER means all values is ok, is matched.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hope you know what I want, Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2013 08:26:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526555#M196764</guid>
      <dc:creator>uacg0009</dc:creator>
      <dc:date>2013-12-27T08:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Make a new table according to a template table</title>
      <link>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526556#M196765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the reply late, I changed the script that you gave me a little,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by now it is correct and thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2013 08:41:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526556#M196765</guid>
      <dc:creator>uacg0009</dc:creator>
      <dc:date>2013-12-27T08:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Make a new table according to a template table</title>
      <link>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526557#M196766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Zhao,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to create an explicit if..else if conditon to create such field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join or applyMap won't help in your case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Brijesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2013 11:16:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-a-new-table-according-to-a-template-table/m-p/526557#M196766</guid>
      <dc:creator>brijesh1991</dc:creator>
      <dc:date>2013-12-27T11:16:42Z</dc:date>
    </item>
  </channel>
</rss>

