<?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 help to find best join scenario in Qlik Learning Discussions</title>
    <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/help-to-find-best-join-scenario/m-p/799265#M2446</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Could someone help me to find the best way of joining to tables?=)&lt;/P&gt;&lt;P&gt;I've got two tables, like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[A,B,C,D,E,F&lt;/P&gt;&lt;P&gt;1,2,3,4,5,6&lt;/P&gt;&lt;P&gt;5,4,1,2,3,8&lt;/P&gt;&lt;P&gt;4,1,2,7,8,9&lt;/P&gt;&lt;P&gt;7,8,9,6,5,4&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[A,B,C,D,E,F&lt;/P&gt;&lt;P&gt;1,2,3,4,5,p&lt;/P&gt;&lt;P&gt;5,4,1,2,w,e&lt;/P&gt;&lt;P&gt;4,1,2,7,8,9&lt;/P&gt;&lt;P&gt;7,8,9,6,5,4&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;and as a result I need &lt;/P&gt;&lt;P&gt;1,2,3,4,5,6&lt;/P&gt;&lt;P&gt;5,4,1,2,3,8&lt;/P&gt;&lt;P&gt;5,4,1,2,w,e&lt;/P&gt;&lt;P&gt;4,1,2,7,8,9&lt;/P&gt;&lt;P&gt;7,8,9,6,5,4&lt;/P&gt;&lt;P&gt;So if only one last field differs, Qlik should take the value from first table, and if two fields differ, it should take BOTH lines to teh resulting table. practically my second table is a result of group- i'm calculating totals and if there was no total in the first table, I need to put it there, but if there already was then its &lt;SPAN style="color: #222222; font-size: 12pt; background-color: #f5f5f5; font-family: arial, sans-serif;"&gt;in priority&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Dec 2014 05:41:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-12-09T05:41:42Z</dc:date>
    <item>
      <title>help to find best join scenario</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/help-to-find-best-join-scenario/m-p/799265#M2446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Could someone help me to find the best way of joining to tables?=)&lt;/P&gt;&lt;P&gt;I've got two tables, like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[A,B,C,D,E,F&lt;/P&gt;&lt;P&gt;1,2,3,4,5,6&lt;/P&gt;&lt;P&gt;5,4,1,2,3,8&lt;/P&gt;&lt;P&gt;4,1,2,7,8,9&lt;/P&gt;&lt;P&gt;7,8,9,6,5,4&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[A,B,C,D,E,F&lt;/P&gt;&lt;P&gt;1,2,3,4,5,p&lt;/P&gt;&lt;P&gt;5,4,1,2,w,e&lt;/P&gt;&lt;P&gt;4,1,2,7,8,9&lt;/P&gt;&lt;P&gt;7,8,9,6,5,4&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;and as a result I need &lt;/P&gt;&lt;P&gt;1,2,3,4,5,6&lt;/P&gt;&lt;P&gt;5,4,1,2,3,8&lt;/P&gt;&lt;P&gt;5,4,1,2,w,e&lt;/P&gt;&lt;P&gt;4,1,2,7,8,9&lt;/P&gt;&lt;P&gt;7,8,9,6,5,4&lt;/P&gt;&lt;P&gt;So if only one last field differs, Qlik should take the value from first table, and if two fields differ, it should take BOTH lines to teh resulting table. practically my second table is a result of group- i'm calculating totals and if there was no total in the first table, I need to put it there, but if there already was then its &lt;SPAN style="color: #222222; font-size: 12pt; background-color: #f5f5f5; font-family: arial, sans-serif;"&gt;in priority&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 05:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/help-to-find-best-join-scenario/m-p/799265#M2446</guid>
      <dc:creator />
      <dc:date>2014-12-09T05:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: help to find best join scenario</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/help-to-find-best-join-scenario/m-p/799266#M2447</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;Attached is solution code for your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTRH&lt;/P&gt;&lt;P&gt;Sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 05:55:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/help-to-find-best-join-scenario/m-p/799266#M2447</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2014-12-09T05:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: help to find best join scenario</title>
      <link>https://community.qlik.com/t5/Qlik-Learning-Discussions/help-to-find-best-join-scenario/m-p/799267#M2448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" data-avatarid="-1" data-userid="50986" data-username="Sushil353" href="https://community.qlik.com/people/Sushil353" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #3778c7; text-decoration: underline;"&gt;Sushil Kumar&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;, thank you for your answer!!&lt;/P&gt;&lt;P&gt;could you, please, advice me, how to combine it with group dy, made in load of 2nd table? 'cos I'm receivind invalid expression error, as expected...&lt;/P&gt;&lt;P&gt;Actual script is as follows:&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;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sales_plan&lt;/SPAN&gt;:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;load&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;SalesOffice,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;State ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Channel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Production_Direction ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; TradeMark,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; Product_Type ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Amount,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Year,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Month,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(len(trim(Group))=0,'All '&amp;amp;Type,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Product_Type&lt;/SPAN&gt;) as Product_Group,//if its an aggregated plan already&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;from sales.qvd (qvd);&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;Sales:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;load&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;SalesOffice,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;State ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Channel,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Production_Direction ,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; TradeMark,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; Product_Type ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Amount,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; Year,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Month,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; sum(Amount) as Amount,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp; 'All '&amp;amp;Type as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; Product_&lt;/SPAN&gt;Group&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;resident &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sales_plan&lt;/SPAN&gt; Group by Direction,TradeMark,Type,SalesIffice, State,Channel;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Dec 2014 08:30:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Learning-Discussions/help-to-find-best-join-scenario/m-p/799267#M2448</guid>
      <dc:creator />
      <dc:date>2014-12-09T08:30:24Z</dc:date>
    </item>
  </channel>
</rss>

