<?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: Date between range - how to connect tables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505601#M103979</link>
    <description>&lt;P&gt;I would directly add the price to the orders - in this way:&lt;/P&gt;
&lt;P&gt;m: mapping load &lt;BR /&gt;&amp;nbsp; &amp;nbsp;date(Date_Price_from + iterno() -1) &amp;amp; '|' &amp;amp; ArtId &amp;amp; '|' &amp;amp; Type_of_offer, Price&lt;BR /&gt;from Prices while&amp;nbsp;Date_Price_from + iterno() -1 &amp;lt;= Date_Price_to;&lt;/P&gt;
&lt;P&gt;Orders: load *, applymap('m',&amp;nbsp;Date_of_order &amp;amp; '|' &amp;amp; ArtId &amp;amp; '|' &amp;amp; Type_of_offer, '#NV') as Price&lt;BR /&gt;from Orders;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Feb 2025 14:55:04 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2025-02-12T14:55:04Z</dc:date>
    <item>
      <title>Date between range - how to connect tables</title>
      <link>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505586#M103973</link>
      <description>&lt;P&gt;Hi &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I have two tables:&lt;/P&gt;
&lt;P&gt;First table:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;Orders:
Load 
    OrderId
    Type_of_offer,  // additional value --&amp;gt; ArtId and Type_of_offer is like a Key 
    ArtId,
    Date_of_order
From Orders;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Second Table:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;Prices:
LOAD
    ArtId,
    Type_of_offer,
    Date_Price_from,
    Date_Price_to,
    Price
FROM Prices;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to have a price of article in orders at the time the order was created with particular type of order - so the order_date has to be between date_from and date_to for key pair ArtId and Type_of_offer&lt;/P&gt;
&lt;P&gt;I use&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;ArtId&amp;amp;'/'&amp;amp;Type_of_offer as Key&lt;/LI-CODE&gt;
&lt;P&gt;since the price will be different for articles depending on date and type_of_offer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to connect this? I heard of Intervalmatch() but i don't know how to use it properly. Table with orders is quite big and i don't know which solution is the best.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 13:52:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505586#M103973</guid>
      <dc:creator>midnight1</dc:creator>
      <dc:date>2025-02-12T13:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date between range - how to connect tables</title>
      <link>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505592#M103974</link>
      <description>&lt;P&gt;Pls provide some sample data and expected output. data speaks more than what we would like to explain. thnx&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 14:23:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505592#M103974</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2025-02-12T14:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date between range - how to connect tables</title>
      <link>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505601#M103979</link>
      <description>&lt;P&gt;I would directly add the price to the orders - in this way:&lt;/P&gt;
&lt;P&gt;m: mapping load &lt;BR /&gt;&amp;nbsp; &amp;nbsp;date(Date_Price_from + iterno() -1) &amp;amp; '|' &amp;amp; ArtId &amp;amp; '|' &amp;amp; Type_of_offer, Price&lt;BR /&gt;from Prices while&amp;nbsp;Date_Price_from + iterno() -1 &amp;lt;= Date_Price_to;&lt;/P&gt;
&lt;P&gt;Orders: load *, applymap('m',&amp;nbsp;Date_of_order &amp;amp; '|' &amp;amp; ArtId &amp;amp; '|' &amp;amp; Type_of_offer, '#NV') as Price&lt;BR /&gt;from Orders;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 14:55:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505601#M103979</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-02-12T14:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date between range - how to connect tables</title>
      <link>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505613#M103981</link>
      <description>&lt;P&gt;You're right, I should have added something:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="example.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/177493iA924EEF06D04D83F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="example.png" alt="example.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; Although this piece of data might have similar data, it shows that if the order for some article is placed with some type_of_offer i want to find the price for this pair ArtId&amp;amp;type_of_offer judging by date_of order which has to be between two dates from price table for that&amp;nbsp;ArtId&amp;amp;type_of_offer pair&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 15:17:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505613#M103981</guid>
      <dc:creator>midnight1</dc:creator>
      <dc:date>2025-02-12T15:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Date between range - how to connect tables</title>
      <link>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505615#M103982</link>
      <description>&lt;P&gt;The mapping will do the job because an internal load-loop per while + iterno() is included which resolved the fom-to area to a dedicated date which is then string-concatenated with the other parameter. Just comment the mapping-statement and take then a look on the table in the data-model or the UI.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 15:26:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505615#M103982</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-02-12T15:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Date between range - how to connect tables</title>
      <link>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505684#M104007</link>
      <description>&lt;P&gt;You could also go for an &lt;EM&gt;&lt;STRONG&gt;intervalmatch&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;() approach to solve this.&lt;/P&gt;
&lt;P&gt;First load your two tables as described in the post.&lt;/P&gt;
&lt;P&gt;Then add the following script&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;//left join (Orders) //is an option if you don't want the intervalmatch table in between the two original tables.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Intervalmatch_table:&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Intervalmatch (Date_of_order,ArtId,Type_of_offer)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Load &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Date_Price_from,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Date_Price_to,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;ArtId,&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Type_of_offer&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Resident Prices;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2025 23:01:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2505684#M104007</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2025-02-12T23:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date between range - how to connect tables</title>
      <link>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2506226#M104139</link>
      <description>&lt;P&gt;maybe helpful:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/QlikView-Documents/IntervalMatch-and-Slowly-Changing-Dimensions/ta-p/1479928" target="_blank"&gt;IntervalMatch and Slowly Changing Dimensions - Qlik Community - 1479928&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/t5/Design/Slowly-Changing-Dimensions/ba-p/1464187" target="_blank"&gt;Slowly Changing Dimensions - Qlik Community - 1464187&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/IntervalMatch.htm#:~:text=When%20the%20IntervalMatch%20prefix%20is%20extended%20with%20key%20fields%2C%20it%20is%20used%20to%20create%20a%20table%20matching%20discrete%20numeric%20values%20to%20one%20or%20more%20numeric%20intervals%2C%20while%20at%20the%20same%20time%20matching%20the%20values%20of%20one%20or%20several%20additional%20keys" target="_blank"&gt;https://help.qlik.com/en-US/sense/November2024/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/IntervalMatch.htm#:~:text=When%20the%20IntervalMatch%20prefix%20is%20extended%20with%20key%20fields%2C%20it%20is%20used%20to%20create%20a%20table%20matching%20discrete%20numeric%20values%20to%20one%20or%20more%20numeric%20intervals%2C%20while%20at%20the%20same%20time%20matching%20the%20values%20of%20one%20or%20several%20additional%20keys&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 16:44:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Date-between-range-how-to-connect-tables/m-p/2506226#M104139</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2025-02-17T16:44:41Z</dc:date>
    </item>
  </channel>
</rss>

