<?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: Macro to select data from two separate table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-to-select-data-from-two-separate-table/m-p/305040#M1187666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quick and dirty answer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;sum(aggr(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if(B_FACT_TYPE='$(vCurrValue)', sum(B_PRICE), if(len(GetCurrentSelections(B_FACT_TYPE))=0, sum(B_PRICE)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;,B_PART_NO))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, why DID you rename your FACT_TYPE field in your two tables?&amp;nbsp; Why don't you want to connect them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also note that your approach only gives answers when no or a single A_FACT_TYPE are selected.&amp;nbsp; If you select more than one, it fails.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Aug 2011 20:40:27 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-08-26T20:40:27Z</dc:date>
    <item>
      <title>Macro to select data from two separate table</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-select-data-from-two-separate-table/m-p/305038#M1187664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;It's been a long time.&lt;/P&gt;&lt;P&gt;I recently came up with one situation, that I had to use two different table to bring data into one chart and &lt;/P&gt;&lt;P&gt;those tables are not connected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In table A I have a field called FACT_TYPE(renamed as FACT_TYPE_A) and in table B I have a FACT_TYPE(renamed as FACT_TYPE_B).&lt;/P&gt;&lt;P&gt;I have attached a sample application, could you please refer to that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need is a macro code that will select FACT_TYPE value from both table. Otherwise I had to select manually from both tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many a thanks beforehand,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bikash Debnath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 18:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-select-data-from-two-separate-table/m-p/305038#M1187664</guid>
      <dc:creator />
      <dc:date>2011-08-26T18:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to select data from two separate table</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-select-data-from-two-separate-table/m-p/305039#M1187665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I tried to solve it this way. I have attached the solution with a sample qvw application.&lt;/P&gt;&lt;P&gt;But I still have another problem, when I do a selection, I am not able to get the Total Sum bar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone please help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bikash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 20:23:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-select-data-from-two-separate-table/m-p/305039#M1187665</guid>
      <dc:creator />
      <dc:date>2011-08-26T20:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to select data from two separate table</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-select-data-from-two-separate-table/m-p/305040#M1187666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quick and dirty answer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;sum(aggr(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if(B_FACT_TYPE='$(vCurrValue)', sum(B_PRICE), if(len(GetCurrentSelections(B_FACT_TYPE))=0, sum(B_PRICE)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;,B_PART_NO))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, why DID you rename your FACT_TYPE field in your two tables?&amp;nbsp; Why don't you want to connect them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also note that your approach only gives answers when no or a single A_FACT_TYPE are selected.&amp;nbsp; If you select more than one, it fails.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 20:40:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-select-data-from-two-separate-table/m-p/305040#M1187666</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-26T20:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to select data from two separate table</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-select-data-from-two-separate-table/m-p/305041#M1187667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Thanks for your prompt response.&lt;/P&gt;&lt;P&gt;The reason why I didn't join FACT_TYPE is because the other details(dimensions) doesn't contain related data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only the FACT_TYPE field values are same in both cases. Hence I need both FACT_TYPE only for selection purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Bikash Debnath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 20:44:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-select-data-from-two-separate-table/m-p/305041#M1187667</guid>
      <dc:creator />
      <dc:date>2011-08-26T20:44:03Z</dc:date>
    </item>
  </channel>
</rss>

