<?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 Creating a ratio using two variables from two separate tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-a-ratio-using-two-variables-from-two-separate-tables/m-p/890938#M657961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to construct a ratio of two variables residing in two separate load statements.&amp;nbsp; I started by concatenating the two tables based on a common column- Date.&amp;nbsp;&amp;nbsp; Then I referenced the variables to construct the ratio and referenced the concatenated table using "resident".&amp;nbsp; The output values are all zero.&amp;nbsp; I'm not sure what I'm doing wrong.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pop_Tax:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#("DATE",'YYYY'),'YYYY') AS DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; US as [Pop_US]&lt;/P&gt;&lt;P&gt;FROM [lib://Demographics/Population by state.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is US);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE(Pop_Tax) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#("date",'YYYY-MM-DD'),'M/D/YYYY') AS DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value*1000 as USTax&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM [lib://State Government Tax Collections, Total Taxes in the United States]&lt;/P&gt;&lt;P&gt;(XmlSimple, table is [observations/observation]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tax_percap: &lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;DATE,&lt;/P&gt;&lt;P&gt;Div((USTax),[Pop_US]) as [USTAX_PerCap],&lt;/P&gt;&lt;P&gt;STATE&lt;/P&gt;&lt;P&gt;Resident Pop_Tax;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jun 2015 19:01:56 GMT</pubDate>
    <dc:creator>jleefjcapital</dc:creator>
    <dc:date>2015-06-01T19:01:56Z</dc:date>
    <item>
      <title>Creating a ratio using two variables from two separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-ratio-using-two-variables-from-two-separate-tables/m-p/890938#M657961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to construct a ratio of two variables residing in two separate load statements.&amp;nbsp; I started by concatenating the two tables based on a common column- Date.&amp;nbsp;&amp;nbsp; Then I referenced the variables to construct the ratio and referenced the concatenated table using "resident".&amp;nbsp; The output values are all zero.&amp;nbsp; I'm not sure what I'm doing wrong.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pop_Tax:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#("DATE",'YYYY'),'YYYY') AS DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; US as [Pop_US]&lt;/P&gt;&lt;P&gt;FROM [lib://Demographics/Population by state.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is US);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE(Pop_Tax) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#("date",'YYYY-MM-DD'),'M/D/YYYY') AS DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value*1000 as USTax&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM [lib://State Government Tax Collections, Total Taxes in the United States]&lt;/P&gt;&lt;P&gt;(XmlSimple, table is [observations/observation]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tax_percap: &lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;DATE,&lt;/P&gt;&lt;P&gt;Div((USTax),[Pop_US]) as [USTAX_PerCap],&lt;/P&gt;&lt;P&gt;STATE&lt;/P&gt;&lt;P&gt;Resident Pop_Tax;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 19:01:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-ratio-using-two-variables-from-two-separate-tables/m-p/890938#M657961</guid>
      <dc:creator>jleefjcapital</dc:creator>
      <dc:date>2015-06-01T19:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a ratio using two variables from two separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-ratio-using-two-variables-from-two-separate-tables/m-p/890939#M657962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need a JOIN for this analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Pop_Tax:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#("DATE",'YYYY'),'YYYY') AS DATE,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; US as [Pop_US]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM [lib://Demographics/Population by state.xlsx]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(ooxml, embedded labels, table is US);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Join&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#("date",'YYYY-MM-DD'),'M/D/YYYY') AS DATE,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; value*1000 as USTax&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FROM [lib://State Government Tax Collections, Total Taxes in the United States]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(XmlSimple, table is [observations/observation]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(Change to left join or inner join according to your requirements)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 06:30:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-ratio-using-two-variables-from-two-separate-tables/m-p/890939#M657962</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-06-02T06:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a ratio using two variables from two separate tables</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-a-ratio-using-two-variables-from-two-separate-tables/m-p/890940#M657963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&amp;nbsp; It worked. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 19:47:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-a-ratio-using-two-variables-from-two-separate-tables/m-p/890940#M657963</guid>
      <dc:creator>jleefjcapital</dc:creator>
      <dc:date>2015-06-02T19:47:19Z</dc:date>
    </item>
  </channel>
</rss>

