<?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 two tables by creating a calculated link column in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047192#M86131</link>
    <description>&lt;P&gt;So you don't want to create your result in the data model, you want to do it in a table chart in frontend.&lt;/P&gt;
&lt;P&gt;Try an expression instead of the ETD_DATE field: &lt;BR /&gt;if(ETD_DATE&amp;gt;=EFFECTIVE_DATE and ETD_DATE&amp;lt;=EXPIRY_DATE, ETD_DATE)&lt;/P&gt;
&lt;P&gt;I'm thinking that should give NULL for the rows you want to hide, and you can exklude null values in the settings for the table.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Mar 2023 08:34:05 GMT</pubDate>
    <dc:creator>henrikalmen</dc:creator>
    <dc:date>2023-03-09T08:34:05Z</dc:date>
    <item>
      <title>join two tables by creating a calculated link column</title>
      <link>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2046681#M86093</link>
      <description>&lt;P&gt;I have two tables with columns as below&lt;/P&gt;
&lt;P&gt;Header_Table:&lt;BR /&gt;Unique_object_id,&lt;BR /&gt;OBJECT_TYPE,&lt;BR /&gt;WORK_STATE,&lt;BR /&gt;CONTAINER_TYPE,&lt;BR /&gt;CARRIER_NAME,&lt;BR /&gt;PORT_OF_DISCHARGE,&lt;BR /&gt;ETD_DATE&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Rate_Table:&lt;BR /&gt;CARRIER_NAME,&lt;BR /&gt;PORT_OF_DISCHARGE,&lt;BR /&gt;CONTAINER_TYPE,&lt;BR /&gt;EFFECTIVE_DATE,&lt;BR /&gt;EXPIRY_DATE,&lt;BR /&gt;RATE&lt;/P&gt;
&lt;P&gt;I want to link the two tables by comparing fields&amp;nbsp;CARRIER_NAME,PORT_OF_DISCHARGE,&amp;nbsp;CONTAINER_TYPE and comparing&amp;nbsp;ETD_DATE should fall within&amp;nbsp;EFFECTIVE_DATE and&amp;nbsp;EXPIRY_DATE, if matched we will add the RATE to the&amp;nbsp;Header_Table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a link column as&amp;nbsp;&amp;nbsp;"CARRIER_NAME" &amp;amp; '|' &amp;amp; "PORT_OF_DISCHARGE" &amp;amp; '|' &amp;amp; 'CONTAINER_TYPE' in both the tables. Issue is I'm not able to create the link between ETD_DATE and&amp;nbsp;EFFECTIVE_DATE and&amp;nbsp;EXPIRY_DATE.&lt;/P&gt;
&lt;P&gt;Is there a way to create the link based on above mentioned columns.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 10:15:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2046681#M86093</guid>
      <dc:creator>Venthan</dc:creator>
      <dc:date>2023-03-08T10:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: join two tables by creating a calculated link column</title>
      <link>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2046689#M86094</link>
      <description>&lt;P&gt;I think you could load your Header_Table as you have done, and then do this:&lt;/P&gt;
&lt;P&gt;left join(Header_Table)&lt;BR /&gt;load * from [ratetable]&lt;BR /&gt;where ETD_DATE&amp;gt;=EFFECTIVE_DATE and ETD_DATE&amp;lt;=EXPIRY_DATE&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;If I have understood your issue correctly, this could probably solve it for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 10:31:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2046689#M86094</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2023-03-08T10:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: join two tables by creating a calculated link column</title>
      <link>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2046744#M86096</link>
      <description>&lt;P&gt;Joins in Qlik are only possible against native fields - any kind of calculation/matching within the where-clause could not be applied.&lt;/P&gt;
&lt;P&gt;But this doesn't mean that you couldn't match these tables. You need only to create a real date from your effective and expiring date, for example with:&lt;/P&gt;
&lt;P&gt;...&lt;BR /&gt;date(EFFECTIVE_DATE + iterno() - 1) as ETD_DATE&lt;BR /&gt;...&lt;BR /&gt;while&amp;nbsp;EFFECTIVE_DATE + iterno() - 1 &amp;lt;= EXPIRY_DATE;&lt;/P&gt;
&lt;P&gt;which creates appropriate records for each date in between and now the join should work.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 11:57:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2046744#M86096</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-03-08T11:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: join two tables by creating a calculated link column</title>
      <link>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047131#M86125</link>
      <description>&lt;P&gt;Rate Table:&lt;/P&gt;
&lt;TABLE width="764"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="163"&gt;link_column&lt;/TD&gt;
&lt;TD width="105"&gt;CARRIER_NAME&lt;/TD&gt;
&lt;TD width="143"&gt;PORT_OF_DISCHARGE&lt;/TD&gt;
&lt;TD width="117"&gt;CONTAINER_TYPE&lt;/TD&gt;
&lt;TD width="110"&gt;EFFECTIVE_DATE&lt;/TD&gt;
&lt;TD width="88"&gt;EXPIRY_DATE&lt;/TD&gt;
&lt;TD width="38"&gt;RATE&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;ABC|INNSA|20FT&lt;/TD&gt;
&lt;TD&gt;ABC&lt;/TD&gt;
&lt;TD&gt;INNSA&lt;/TD&gt;
&lt;TD&gt;20FT&lt;/TD&gt;
&lt;TD&gt;01/01/2022&lt;/TD&gt;
&lt;TD&gt;31/12/2022&lt;/TD&gt;
&lt;TD&gt;100&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;ABC|INNSA|20FT&lt;/TD&gt;
&lt;TD&gt;ABC&lt;/TD&gt;
&lt;TD&gt;INNSA&lt;/TD&gt;
&lt;TD&gt;20FT&lt;/TD&gt;
&lt;TD&gt;01/01/2023&lt;/TD&gt;
&lt;TD&gt;31/12/2023&lt;/TD&gt;
&lt;TD&gt;150&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Header Table:&lt;/P&gt;
&lt;TABLE width="851"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="115"&gt;link_column&lt;/TD&gt;
&lt;TD width="118"&gt;Unique_object_id&lt;/TD&gt;
&lt;TD width="88"&gt;OBJECT_TYPE&lt;/TD&gt;
&lt;TD width="90"&gt;WORK_STATE&lt;/TD&gt;
&lt;TD width="117"&gt;CONTAINER_TYPE&lt;/TD&gt;
&lt;TD width="105"&gt;CARRIER_NAME&lt;/TD&gt;
&lt;TD width="143"&gt;PORT_OF_DISCHARGE&lt;/TD&gt;
&lt;TD width="75"&gt;ETD_DATE&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;ABC|INNSA|20FT&lt;/TD&gt;
&lt;TD&gt;1234&lt;/TD&gt;
&lt;TD&gt;TR&lt;/TD&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;20FT&lt;/TD&gt;
&lt;TD&gt;ABC&lt;/TD&gt;
&lt;TD&gt;INNSA&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;15/02/2023&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here I want link join Rate table to Header table, which has the Rate 150, i.e. ETD date of header record falls within Effective date and Expiry Date of Rate table.&lt;/P&gt;
&lt;P&gt;I'm not able to do this via Interval match as I get circular reference. I tried with iterno() but somehow that doesn't work correctly.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 06:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047131#M86125</guid>
      <dc:creator>Venthan</dc:creator>
      <dc:date>2023-03-09T06:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: join two tables by creating a calculated link column</title>
      <link>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047175#M86127</link>
      <description>&lt;P&gt;I'm still not sure what you want to achieve. Those two tables will be linked via &lt;EM&gt;link_column&lt;/EM&gt; if you load them both separately, but since both tables contains the fields CONTAINER_TYPE and CARRIER_NAME you would get so called synthetic keys in your data model since there will be links also between those fields.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 08:02:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047175#M86127</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2023-03-09T08:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: join two tables by creating a calculated link column</title>
      <link>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047179#M86128</link>
      <description>&lt;P&gt;Hi Henrik,&lt;/P&gt;
&lt;P&gt;I want a report output as below,&lt;/P&gt;
&lt;TABLE width="710"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="118"&gt;Unique_object_id&lt;/TD&gt;
&lt;TD width="88"&gt;OBJECT_TYPE&lt;/TD&gt;
&lt;TD width="117"&gt;CONTAINER_TYPE&lt;/TD&gt;
&lt;TD width="143"&gt;PORT_OF_DISCHARGE&lt;/TD&gt;
&lt;TD width="105"&gt;CARRIER_NAME&lt;/TD&gt;
&lt;TD width="75"&gt;ETD_DATE&lt;/TD&gt;
&lt;TD width="64"&gt;RATE&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1234&lt;/TD&gt;
&lt;TD&gt;TR&lt;/TD&gt;
&lt;TD&gt;20FT&lt;/TD&gt;
&lt;TD&gt;INNSA&lt;/TD&gt;
&lt;TD&gt;ABC&lt;/TD&gt;
&lt;TD&gt;15/02/2023&lt;/TD&gt;
&lt;TD&gt;150&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you mentioned, based on the link_column the tables will be linked but if I create a table chart, we will get two records. I will manage the synthetic keys by renaming the&amp;nbsp;&lt;SPAN&gt;CONTAINER_TYPE&amp;nbsp;and&amp;nbsp;CARRIER_NAME&amp;nbsp;in Rate Table&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My objective here is link the two tables based on link_column and then consider the record from Rate table where ETD_Date &amp;gt;= EFFECTIVE_DATE and&amp;nbsp;ETD_Date &amp;lt;= EXPIRY_DATE.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 08:12:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047179#M86128</guid>
      <dc:creator>Venthan</dc:creator>
      <dc:date>2023-03-09T08:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: join two tables by creating a calculated link column</title>
      <link>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047192#M86131</link>
      <description>&lt;P&gt;So you don't want to create your result in the data model, you want to do it in a table chart in frontend.&lt;/P&gt;
&lt;P&gt;Try an expression instead of the ETD_DATE field: &lt;BR /&gt;if(ETD_DATE&amp;gt;=EFFECTIVE_DATE and ETD_DATE&amp;lt;=EXPIRY_DATE, ETD_DATE)&lt;/P&gt;
&lt;P&gt;I'm thinking that should give NULL for the rows you want to hide, and you can exklude null values in the settings for the table.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 08:34:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047192#M86131</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2023-03-09T08:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: join two tables by creating a calculated link column</title>
      <link>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047277#M86134</link>
      <description>&lt;P&gt;Hi Henrik,&lt;/P&gt;
&lt;P&gt;Thanks, this works.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Try an expression instead of the ETD_DATE field:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(ETD_DATE&amp;gt;=EFFECTIVE_DATE and ETD_DATE&amp;lt;=EXPIRY_DATE, ETD_DATE)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 10:03:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/join-two-tables-by-creating-a-calculated-link-column/m-p/2047277#M86134</guid>
      <dc:creator>Venthan</dc:creator>
      <dc:date>2023-03-09T10:03:06Z</dc:date>
    </item>
  </channel>
</rss>

