<?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: Applymap in 1-many situation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811355#M1036996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jai, mine was a silly example of how make duplicates using applymap, if you use applymap alone, without the concat step in the Map table and without the Subfield function in Data2 table, applymap will get the first sorted value, and there will be no duplicate issue. If fact, one of the advantages to use applymap is to avoid duplicate issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have some issue you should open a new question, explaining your issue. Better if you give sample data, wich results you get wrong and what results are you expecting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Me or others user online at that moment will help you to resolve your issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Apr 2015 16:21:20 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2015-04-06T16:21:20Z</dc:date>
    <item>
      <title>Applymap in 1-many situation</title>
      <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811348#M1036989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have read the below statement-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Whenever there is a one to many relationship between tables then a separate table must be loaded into the data model instead of using a mapping table and applymap.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please explain(with a sample data model) me what is the issue, if we use applymap when there is one-many relationship??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks !!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jan 2015 13:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811348#M1036989</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2015-01-02T13:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: Applymap in 1-many situation</title>
      <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811349#M1036990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See this:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/676348#676348" title="http://community.qlik.com/message/676348#676348"&gt;http://community.qlik.com/message/676348#676348&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jan 2015 13:20:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811349#M1036990</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2015-01-02T13:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Applymap in 1-many situation</title>
      <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811350#M1036991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And also:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/653660#653660" title="http://community.qlik.com/message/653660#653660"&gt;http://community.qlik.com/message/653660#653660&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jan 2015 13:21:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811350#M1036991</guid>
      <dc:creator>ecolomer</dc:creator>
      <dc:date>2015-01-02T13:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Applymap in 1-many situation</title>
      <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811351#M1036992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suraj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ApplyMap will only map the first sorted value from your mapping table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine a table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Key&amp;nbsp; Value&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you join your fact table with the above table, you will end up with duplicate values - for A your output will have the values:&lt;/P&gt;&lt;P&gt;A = 1,2 and 3&lt;/P&gt;&lt;P&gt;B = 1 and 2&lt;/P&gt;&lt;P&gt;C = 1&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; (as it only has one value).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ApplyMap however, will only return one value for each Key, which in the above example will return&lt;/P&gt;&lt;P&gt;A = 1&lt;/P&gt;&lt;P&gt;B = 1&lt;/P&gt;&lt;P&gt;C = 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 is returned as this is the first sorted value in your table. &lt;/P&gt;&lt;P&gt;This is actually brilliant when we are working wit facttables and want to avoid duplicate rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this makes sense?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jan 2015 13:29:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811351#M1036992</guid>
      <dc:creator>martin_dideriks</dc:creator>
      <dc:date>2015-01-02T13:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Applymap in 1-many situation</title>
      <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811352#M1036993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suraj, by default, if you link one to many in the same table, it's only possible duplicating records, and the way to avoid duplicate records is to load in different table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default applymap only returns one value (if there are many it returns only the first it finds), you can retrieve many using a mix of concat and subfield but I can't think in any usefull situation to make this, in a silly example it can be something like:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Data:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;LOAD * INLINE [&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Nº, client&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;1, Client 1&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;1, Client 1-2&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;2, Client 2&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;];&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Map:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Mapping LOAD Nº, concat(client, '#') Resident Data Group by Nº;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Data2:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;LOAD Subfield(ApplyMap('Map', Nº), '#') as Client,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;LOAD * Inline [&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Nº, Sales&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;1, 5000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;2, 10000&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;];&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;DROP Table Data;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That will duplicate the sales for client Nº 1, it doesn't makes sense but is an example of using applymap with a one to many relationship.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jan 2015 13:29:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811352#M1036993</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-01-02T13:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Applymap in 1-many situation</title>
      <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811353#M1036994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone for the valuable information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jan 2015 15:39:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811353#M1036994</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2015-01-02T15:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: Applymap in 1-many situation</title>
      <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811354#M1036995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Hi Ruben,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px;"&gt;You written post on &lt;/SPAN&gt;&lt;A _jive_internal="true" class="jive-link-thread-small generated-link" data-jive-statusinputadd="true" data-jive-truncation-flag="true" href="https://community.qlik.com/thread/147241" style="font-size: 13px; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; color: #3778c7;"&gt;Applymap in 1-many situation&lt;/A&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px;"&gt;The above you have written for apply map(1 to many relation).How to solve the duplicate issue here(Thats where I am stuck)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Can you please help me on how to solve the duplicate sales values.??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px;"&gt;your help is really appreciated...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Awaiting for your reply&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Jai&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Apr 2015 14:50:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811354#M1036995</guid>
      <dc:creator />
      <dc:date>2015-04-05T14:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Applymap in 1-many situation</title>
      <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811355#M1036996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jai, mine was a silly example of how make duplicates using applymap, if you use applymap alone, without the concat step in the Map table and without the Subfield function in Data2 table, applymap will get the first sorted value, and there will be no duplicate issue. If fact, one of the advantages to use applymap is to avoid duplicate issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have some issue you should open a new question, explaining your issue. Better if you give sample data, wich results you get wrong and what results are you expecting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Me or others user online at that moment will help you to resolve your issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2015 16:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811355#M1036996</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-04-06T16:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Applymap in 1-many situation</title>
      <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811356#M1036997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your Quick reply Rubin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue is my table has one to many relationships(Same table)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example NI-1004sku has some 5 duplicate sku mapped&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thats one of the reason I used your example script of Concat example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However there are there ratios and Quantity  against the above getting&lt;/P&gt;&lt;P&gt;duplicated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know,if you worked on similar situation and solved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jai&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On Mon, Apr 6, 2015 at 9:51 PM, Ruben Marin &amp;lt;qcwebmaster@qlikview.com&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Apr 2015 16:49:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811356#M1036997</guid>
      <dc:creator />
      <dc:date>2015-04-06T16:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Applymap in 1-many situation</title>
      <link>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811357#M1036998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A sku with 5 descriptions?, I think that each description should have his date range to apply or there must be something to difference or to unify the sku description for each (picking the last one?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway if you have to maintain that duplicates you'll need to load the relation in other table, as said in the beggining of my later post:&lt;/P&gt;&lt;P&gt;"if you link one to many in the same table, it's only possible duplicating records, &lt;STRONG&gt;and the way to avoid duplicate records is to load in different table.&lt;/STRONG&gt;"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 10:25:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Applymap-in-1-many-situation/m-p/811357#M1036998</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-04-07T10:25:04Z</dc:date>
    </item>
  </channel>
</rss>

