<?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 more than one description for a 'unique' key in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/more-than-one-description-for-a-unique-key/m-p/218249#M71414</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The simpliest way, I think, is this:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LOAD DISTINCT&lt;BR /&gt; productkey,&lt;BR /&gt; maxstring(description) as description&lt;BR /&gt;RESIDENT Table2&lt;BR /&gt;GROUP by productkey;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;It will give you one description per product key. I can't tell if it will be "the first descripton" - it depends on what you mean by this. &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 Sep 2010 13:29:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-09-26T13:29:13Z</dc:date>
    <item>
      <title>more than one description for a 'unique' key</title>
      <link>https://community.qlik.com/t5/QlikView/more-than-one-description-for-a-unique-key/m-p/218248#M71413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a problem with linking two tables.&lt;BR /&gt;In the first table I have a table with unique productkeys. In the other table I have a table with productkeys and descriptions of the keys.&lt;BR /&gt;For some productkeys there are more than one description.&lt;/P&gt;&lt;P&gt;eg:&lt;BR /&gt;Table1&lt;BR /&gt;productkey&lt;BR /&gt;1&lt;BR /&gt;2&lt;BR /&gt;3&lt;/P&gt;&lt;P&gt;Table2&lt;BR /&gt;productkey description&lt;BR /&gt;1 code1&lt;BR /&gt;1 code 1&lt;BR /&gt;2 code2&lt;BR /&gt;2 code_2&lt;BR /&gt;3 code3&lt;BR /&gt;&lt;BR /&gt;I would like to have as a result:&lt;/P&gt;&lt;P&gt;productkey description&lt;BR /&gt;1 code1&lt;BR /&gt;2 code2&lt;BR /&gt;3 code3&lt;/P&gt;&lt;P&gt;How can I link the two tables so that I keep a 'unique productkey'. So if more than one description exists, I want to keep only the first descripton.&lt;/P&gt;&lt;P&gt;I've tried things with Load Distinct; left join; etc. But that gives not a good result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 12:54:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/more-than-one-description-for-a-unique-key/m-p/218248#M71413</guid>
      <dc:creator />
      <dc:date>2010-09-26T12:54:59Z</dc:date>
    </item>
    <item>
      <title>more than one description for a 'unique' key</title>
      <link>https://community.qlik.com/t5/QlikView/more-than-one-description-for-a-unique-key/m-p/218249#M71414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The simpliest way, I think, is this:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LOAD DISTINCT&lt;BR /&gt; productkey,&lt;BR /&gt; maxstring(description) as description&lt;BR /&gt;RESIDENT Table2&lt;BR /&gt;GROUP by productkey;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;It will give you one description per product key. I can't tell if it will be "the first descripton" - it depends on what you mean by this. &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 13:29:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/more-than-one-description-for-a-unique-key/m-p/218249#M71414</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-26T13:29:13Z</dc:date>
    </item>
    <item>
      <title>more than one description for a 'unique' key</title>
      <link>https://community.qlik.com/t5/QlikView/more-than-one-description-for-a-unique-key/m-p/218250#M71415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this works for the 2 table I have with articlecode desciption.&lt;BR /&gt;But for the articlegroups I have the same problem. Therefor I used also 'Hierarchy' to be able to make a tree structure.&lt;BR /&gt;But the code you give me to keep only one description doesn't work here. Can you say me where I make a mistake.&lt;/P&gt;&lt;P&gt;Artikeltree:&lt;/P&gt;&lt;P&gt;HIERARCHY&lt;BR /&gt; ( %Key_Product_groep, artparent, artikelgroepoms, , artikelgroepoms , Path)&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt; artgrp as %Key_Product_groep,&lt;BR /&gt; left(artgrp,(4*(niv-1))) &amp;amp; repeat( '0000', 8-niv+1) as artparent,&lt;BR /&gt; num(left(artgrp,4)) &amp;amp; '.' &amp;amp; if((num(mid(artgrp,5,4)))&amp;lt;&amp;gt;0,num(mid(artgrp,5,4)))&amp;amp; '.' &amp;amp; if((num(mid(artgrp,9,4)))&amp;lt;&amp;gt;0,num(mid(artgrp,9,4)))&amp;amp; '.' &amp;amp; if((num(mid(artgrp,13,4)))&amp;lt;&amp;gt;0,num(mid(artgrp,13,4))) &amp;amp; '.' &amp;amp; if((num(mid(artgrp,17,4)))&amp;lt;&amp;gt;0,num(mid(artgrp,17,4)))&amp;amp; '.' &amp;amp; if((num(mid(artgrp,21,4)))&amp;lt;&amp;gt;0,num(mid(artgrp,21,4)))&amp;amp; '.' &amp;amp; if((num(mid(artgrp,25,4)))&amp;lt;&amp;gt;0,num(mid(artgrp,25,4)))&amp;amp; '.' &amp;amp; if((num(mid(artgrp,29,4)))&amp;lt;&amp;gt;0,num(mid(artgrp,29,4))) &amp;amp; '.' &amp;amp; omschr1 as artikelgroepoms&lt;BR /&gt;&lt;BR /&gt;FROM&lt;BR /&gt;..\data\QVD\artgrp.qvd&lt;BR /&gt;(qvd);&lt;/P&gt;&lt;P&gt;Artikeltree1:&lt;BR /&gt;LOAD DISTINCT&lt;BR /&gt; %Key_Product_groep,&lt;BR /&gt; artparent,&lt;BR /&gt;MaxString(artikelgroepoms) as artikelgroepoms,&lt;BR /&gt; artikelgroepoms1,&lt;BR /&gt; artikelgroepoms2,&lt;BR /&gt; artikelgroepoms3,&lt;BR /&gt; artikelgroepoms4,&lt;BR /&gt; artikelgroepoms5,&lt;BR /&gt; artikelgroepoms6,&lt;BR /&gt; artikelgroepoms7,&lt;BR /&gt; Path&lt;BR /&gt;&lt;BR /&gt;RESIDENT Artikeltree&lt;BR /&gt;GROUP by %Key_Product_groep;&lt;/P&gt;&lt;P&gt;DROP TABLE Artikeltree;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 18:42:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/more-than-one-description-for-a-unique-key/m-p/218250#M71415</guid>
      <dc:creator />
      <dc:date>2010-09-26T18:42:37Z</dc:date>
    </item>
    <item>
      <title>more than one description for a 'unique' key</title>
      <link>https://community.qlik.com/t5/QlikView/more-than-one-description-for-a-unique-key/m-p/218251#M71416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The last table Artikeltree1 is technically incorrect. When you use GROUP BY, every field must be either in GROUP BY, or be aggregated. Or possibly you need to load only %Key_Product_groep and artikelgroepoms from Artikeltree, as you are doing now but without all the otehr fields, and after that join the other fields from the same Artikeltree, using %Key_Product_groep.&lt;BR /&gt;I cannot tell more without knowing the specifics. anyway, your second post is a different question, and I recommend you to start a new post about it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Sep 2010 18:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/more-than-one-description-for-a-unique-key/m-p/218251#M71416</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-09-26T18:54:02Z</dc:date>
    </item>
  </channel>
</rss>

