<?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: Basic stripting question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481646#M690978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is correct.&amp;nbsp; To simplify is you could do&lt;/P&gt;&lt;P&gt;Plant A as Plant_Key in the first table and&lt;/P&gt;&lt;P&gt;Plant B as Plant_Key in the second table.&amp;nbsp; That way both Tables will have the same field names while concatenating and you can also use the Plant_Key field to distinguish between the two.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Sep 2013 14:06:21 GMT</pubDate>
    <dc:creator>jpapador</dc:creator>
    <dc:date>2013-09-04T14:06:21Z</dc:date>
    <item>
      <title>Basic stripting question</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481642#M690974</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;this is seemingly a very trivial question - I just come across this for the first time.&lt;/P&gt;&lt;P&gt;In one Dashboard that I had finished about halfway, I now have to integrate data from a new source: An exact mirror_image of the database for another plant.&lt;/P&gt;&lt;P&gt;- To later be able to select one plant or the other (or both), I have included a plant_key into the tables.&lt;/P&gt;&lt;P&gt;- I have given this different names in the tables so that I don't end up with a lot of synthetic keys.&lt;/P&gt;&lt;P&gt;- Now, when I use the same fields I have in the "old" version, the keys are not unique anymore.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; Associating tables where the key is not unique in either table is never a good idea in my experience.&lt;/P&gt;&lt;P&gt;=&amp;gt; So, do I have to rename the existing keyfields (so they are not associated anymore) and build new ones, including the plant_key (that's the only thing I can think of as a reason)? Won't that influence the possibility of later selecting plants?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 13:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481642#M690974</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-04T13:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Basic stripting question</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481643#M690975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I can follow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I assume correctly what you are trying to achieve, I would Load both tables into a concatenated table, adding a field Source to describe the source of the data, and maybe force selection of one source in the Dashboard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 13:55:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481643#M690975</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-09-04T13:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Basic stripting question</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481644#M690976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the two databases are the same you could concatenate the tables.&amp;nbsp; If you'd still like to select the different plants on the primary key of the tables you could create a key that distinguishes the two:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;'PlantA' &amp;amp; PrimaryKeyField&lt;/P&gt;&lt;P&gt;Field1,&lt;/P&gt;&lt;P&gt;Field2,&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate (Table1)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;'PlantB' &amp;amp; PrimaryKeyField,&lt;/P&gt;&lt;P&gt;Field1,&lt;/P&gt;&lt;P&gt;Field2,&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you would still have one field for each dimension instead of an old and a new and a way to distinguish the two plants.&amp;nbsp; You could even take it a step further and create a plant field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Left(PrimaryKeyField, 5) = 'PlantA', 'Plant A', 'Plant B') as Plant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 13:59:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481644#M690976</guid>
      <dc:creator>jpapador</dc:creator>
      <dc:date>2013-09-04T13:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Basic stripting question</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481645#M690977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I'm understanding you correctly, I often have similar issues. All I would do is keep the same field names in both sets and use a new field (e.g. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;plant_key) which is unique to each one. So you could have:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Field 1, Field 2, plant_key&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;xxx, xxxx, Plant_1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;xxx, xxxx, Plant_2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Let QlikView &lt;STRONG&gt;concatenate&lt;/STRONG&gt; the two tables and use plant_key to differentiate between the sets. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 14:02:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481645#M690977</guid>
      <dc:creator>kouroshkarimi</dc:creator>
      <dc:date>2013-09-04T14:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Basic stripting question</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481646#M690978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is correct.&amp;nbsp; To simplify is you could do&lt;/P&gt;&lt;P&gt;Plant A as Plant_Key in the first table and&lt;/P&gt;&lt;P&gt;Plant B as Plant_Key in the second table.&amp;nbsp; That way both Tables will have the same field names while concatenating and you can also use the Plant_Key field to distinguish between the two.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 14:06:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481646#M690978</guid>
      <dc:creator>jpapador</dc:creator>
      <dc:date>2013-09-04T14:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Basic stripting question</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481647#M690979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jpapador,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see I omitted a few things.&lt;/P&gt;&lt;P&gt;- I do concatenate the tables - as the structure must be the same, why create two tables.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; The problem is slightly different:&lt;/P&gt;&lt;P&gt;- Apparently, some IDs repeat in the other plant&lt;/P&gt;&lt;P&gt;=&amp;gt; That is why after adding the new data, the keys are not unique anymore.&lt;/P&gt;&lt;P&gt;By creating a compound key including the plant_key and renaming the former keyfields (to get them out of the way and avoid synthetic keys), one of my tables (I have three tables in my data_model currently) is back to a "primary key". That is unique if I remember correctly, so that's all right.&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; In the other table I have to connect, the key is not unique anymore ("key", was "Perfect key") and creating a compound key incl. the plant does not help matters here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 14:08:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481647#M690979</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-04T14:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: Basic stripting question</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481648#M690980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi jpapador,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's what I'm doing.&lt;/P&gt;&lt;P&gt;What's worrying me is the fact that I cannot create a unique key anymore - strangely, in the old version of the Dashboard, it works - after a reload, the keys are still unique, so the base data can't have changed - so the error must lie with what I have done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 14:10:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481648#M690980</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-04T14:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Basic stripting question</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481649#M690981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is solved I guess.&lt;/P&gt;&lt;P&gt;I just had a problem concerning the quality of the keys (Perfect key/ Primary key/ Key). As I thought, I had renamed something and some formulas were not working anymore.&lt;/P&gt;&lt;P&gt;A bit of logical thinking and retracing my steps solved the problem.&lt;/P&gt;&lt;P&gt;Now the quality of the keys is what it was before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks anyway!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 10:54:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-stripting-question/m-p/481649#M690981</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-09-05T10:54:15Z</dc:date>
    </item>
  </channel>
</rss>

