<?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: Join in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Join/m-p/600833#M478265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting a syntax, which says "missing/misplaced FROM: SummaryTable:..." I have converted your code to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SummaryTable:&lt;/P&gt;&lt;P&gt;LOAD TIMB,&lt;/P&gt;&lt;P&gt;Sum([Bales Loaded]),as [Total Loaded]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident [Bale Loop]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;group by TIMB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Herbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Mar 2014 14:45:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-20T14:45:50Z</dc:date>
    <item>
      <title>Join</title>
      <link>https://community.qlik.com/t5/QlikView/Join/m-p/600830#M478262</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 data in two tables that I would like to incorporate into one table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first table is a customer order table at individual order level (customers can have multiple orders)with Customer ID and Quantity ordered columns ( as well as a lot of other columns). The second table is a Customer despatches table at individual order despatch level. This has customer ID and and quantity despatched columns ( plus other columns).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now need to create a new table at customer ID level which will have the columns Customer ID , Quantity Ordered, Quantity Despatched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I go about achieving this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All help appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Herbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:11:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join/m-p/600830#M478262</guid>
      <dc:creator />
      <dc:date>2014-03-20T13:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Join</title>
      <link>https://community.qlik.com/t5/QlikView/Join/m-p/600831#M478263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there no column in any of the two table like order number which marks a particular order uniquely?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:36:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join/m-p/600831#M478263</guid>
      <dc:creator>ankit777</dc:creator>
      <dc:date>2014-03-20T13:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Join</title>
      <link>https://community.qlik.com/t5/QlikView/Join/m-p/600832#M478264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usually it's enough to create a straight table with Customer ID as dimension and two expressions: sum([Quantity ordered]) and sum([Quantity Dispatched]). If you want to calculate it in the script you can do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SummaryTable:&lt;/P&gt;&lt;P&gt;Load [Customer ID], sum([Quantity ordered]) as [Quantity Ordered Customer Total]&lt;/P&gt;&lt;P&gt;Resident Orders&lt;/P&gt;&lt;P&gt;group by [Customer ID];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join (SummaryTable)&lt;/P&gt;&lt;P&gt;Load [Customer ID], sum([Quantity Dispatched]) as [Quantity Dispatched Customer Total]&lt;/P&gt;&lt;P&gt;Resident Dispatches&lt;/P&gt;&lt;P&gt;group by [Customer ID];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join/m-p/600832#M478264</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-03-20T13:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: Join</title>
      <link>https://community.qlik.com/t5/QlikView/Join/m-p/600833#M478265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting a syntax, which says "missing/misplaced FROM: SummaryTable:..." I have converted your code to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SummaryTable:&lt;/P&gt;&lt;P&gt;LOAD TIMB,&lt;/P&gt;&lt;P&gt;Sum([Bales Loaded]),as [Total Loaded]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident [Bale Loop]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;group by TIMB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Herbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 14:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join/m-p/600833#M478265</guid>
      <dc:creator />
      <dc:date>2014-03-20T14:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Join</title>
      <link>https://community.qlik.com/t5/QlikView/Join/m-p/600834#M478266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have a comma just before the &lt;EM&gt;as&lt;/EM&gt; that shouldn't be there: Sum([Bales Loaded]),as [Total Loaded]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 14:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join/m-p/600834#M478266</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-03-20T14:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Join</title>
      <link>https://community.qlik.com/t5/QlikView/Join/m-p/600835#M478267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The join worked perfectly. I have added a bit more to the code to say Total Loaded - Total Delivered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some strange reason, the calculation is working fine where there is a value in both columns Total Loaded and Total Delivered. Where there is a value in only one of the columns, it is not performing the calculation. The code now looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SummaryTable1:&lt;/P&gt;&lt;P&gt;LOAD TIMB,&lt;/P&gt;&lt;P&gt;Sum([Bales Loaded])as [Total Loaded]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident [BALE LOOP]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;group by TIMB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Join(SummaryTable1)&lt;/P&gt;&lt;P&gt;LOAD TIMB,&lt;/P&gt;&lt;P&gt;Sum([Bales Delivered]) as [Total Deliveries]&lt;/P&gt;&lt;P&gt;Resident BOOKINGS&lt;/P&gt;&lt;P&gt;Group by TIMB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[SUMMARYTABLE]:&lt;/P&gt;&lt;P&gt;NoConcatenate LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TIMB,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([Total Loaded]='',0,[Total Loaded]) as [Total Loaded],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([Total Deliveries]='',0,[Total Deliveries]) as [Total Deliveries],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Total Loaded]-[Total Deliveries]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident [SummaryTable1]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Order by TIMB;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP Table [SummaryTable1];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 15:30:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join/m-p/600835#M478267</guid>
      <dc:creator />
      <dc:date>2014-03-20T15:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Join</title>
      <link>https://community.qlik.com/t5/QlikView/Join/m-p/600836#M478268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think in this case what you can use is the rangesum function, which can deal with nulls. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[SUMMARYTABLE]:&lt;/P&gt;&lt;P&gt;NoConcatenate LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TIMB,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Total Loaded],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Total Deliveries],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rangesum([Total Loaded],-[Total Deliveries]) as Result&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident [SummaryTable1]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Order by TIMB;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to test for null values (or blanks) use if(len(trim(SomeField))=0, ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 15:37:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join/m-p/600836#M478268</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-03-20T15:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Join</title>
      <link>https://community.qlik.com/t5/QlikView/Join/m-p/600837#M478269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a very good grasp of QlikView, many thanks for your help. As we would say in this part of the world, You do not deserve to walk amongst mere men.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How long have you been using the product and do you have any tips for someone wanting to learn a whole lot more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Herbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Mar 2014 15:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join/m-p/600837#M478269</guid>
      <dc:creator />
      <dc:date>2014-03-20T15:45:33Z</dc:date>
    </item>
  </channel>
</rss>

