<?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 Join two data sets in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Join-two-data-sets/m-p/1414224#M817451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two sets of data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set A has the following (this is SQL pulling from database)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Company (primary key)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Year&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Product&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Sales Order Number&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Revenue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set B has the following (this is excel file manually managed by me)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Company (primary key)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Industry Segment&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Share (% in each industry segment)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to join the two sets by loading them in QV so the Share in each Industry Segment applies to the Revenue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, ABC Company has following industry segmentation&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Aerospace: 35%&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Medical: 25%&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Energy: 40%&lt;/P&gt;&lt;P&gt;So if it has a Revenue of $1M, it should show up as&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Aerospace: $350K&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Medical: $250K&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Energy: $400K&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;I tried to create a new expression (Adjusted Revenue) with = Share * Revenue but it gives erroneous data. Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>chiranjivdas</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Join two data sets</title>
      <link>https://community.qlik.com/t5/QlikView/Join-two-data-sets/m-p/1414224#M817451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two sets of data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set A has the following (this is SQL pulling from database)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Company (primary key)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Year&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Product&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Sales Order Number&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Revenue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set B has the following (this is excel file manually managed by me)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Company (primary key)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Industry Segment&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Share (% in each industry segment)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to join the two sets by loading them in QV so the Share in each Industry Segment applies to the Revenue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, ABC Company has following industry segmentation&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Aerospace: 35%&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Medical: 25%&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Energy: 40%&lt;/P&gt;&lt;P&gt;So if it has a Revenue of $1M, it should show up as&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Aerospace: $350K&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Medical: $250K&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Energy: $400K&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;I tried to create a new expression (Adjusted Revenue) with = Share * Revenue but it gives erroneous data. Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;CD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-two-data-sets/m-p/1414224#M817451</guid>
      <dc:creator>chiranjivdas</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Join two data sets</title>
      <link>https://community.qlik.com/t5/QlikView/Join-two-data-sets/m-p/1414225#M817452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chiranjiv,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For joining purposes just use the join statement like bellow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SetA:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Company,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProductSales,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Order,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NumberRevenue&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;From [SQLConnection];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&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; font-size: 13px;"&gt;// This does the join, based on the common fields, in this case the "Company" field.&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; font-size: 13px;"&gt;join (SetA)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Load&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Company&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Industry Segment],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Share&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;From [Excel file];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Loads all the fields from the previously created table SetA with the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Revenue &lt;/SPAN&gt;and Share&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;&amp;nbsp; // Since both fields are in the same table, you can do the calculations now&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Share * &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;NumberRevenue &lt;/SPAN&gt;as [&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Adjusted Revenue]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Resident SetA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table SetA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Felipe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 13:52:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-two-data-sets/m-p/1414225#M817452</guid>
      <dc:creator>felipedl</dc:creator>
      <dc:date>2017-08-31T13:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Join two data sets</title>
      <link>https://community.qlik.com/t5/QlikView/Join-two-data-sets/m-p/1414226#M817453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. It worked. The error was because the formula required me to put the sum function and include the share in the parenthesis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(Share*[Adjusted Revenue])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 21:55:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-two-data-sets/m-p/1414226#M817453</guid>
      <dc:creator>chiranjivdas</dc:creator>
      <dc:date>2017-08-31T21:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Join two data sets</title>
      <link>https://community.qlik.com/t5/QlikView/Join-two-data-sets/m-p/1414227#M817454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Das,&lt;/P&gt;&lt;P&gt;If your issues is resolved can you please close the thread marking correct/helpful responses accordingly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Sep 2017 01:07:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-two-data-sets/m-p/1414227#M817454</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-09-01T01:07:29Z</dc:date>
    </item>
  </channel>
</rss>

