<?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 Load aggregation of two variables from different tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1672108#M728193</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables that look like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;Preorder: preorderDate, orderNumber,userId, itemNumber, ItemDescription.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Payment:paymentDate, orderNumber,userId, itemNumber, amountPayed, AmountSent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate the difference between preorderDate and paymentDate in a different table .&lt;/P&gt;&lt;P&gt;like this :&lt;/P&gt;&lt;P&gt;num(date(floor(paymentDate )))-&amp;nbsp;num(date(floor(preorderDate )))&lt;/P&gt;&lt;P&gt;I tried to apply concatenate and mapping function but nothing works.&lt;/P&gt;&lt;P&gt;I get different errors based on the different approaches i took; does anyone have any solutions for this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 19:10:57 GMT</pubDate>
    <dc:creator>hd1</dc:creator>
    <dc:date>2024-11-16T19:10:57Z</dc:date>
    <item>
      <title>Load aggregation of two variables from different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1672108#M728193</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables that look like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;Preorder: preorderDate, orderNumber,userId, itemNumber, ItemDescription.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Payment:paymentDate, orderNumber,userId, itemNumber, amountPayed, AmountSent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to calculate the difference between preorderDate and paymentDate in a different table .&lt;/P&gt;&lt;P&gt;like this :&lt;/P&gt;&lt;P&gt;num(date(floor(paymentDate )))-&amp;nbsp;num(date(floor(preorderDate )))&lt;/P&gt;&lt;P&gt;I tried to apply concatenate and mapping function but nothing works.&lt;/P&gt;&lt;P&gt;I get different errors based on the different approaches i took; does anyone have any solutions for this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:10:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1672108#M728193</guid>
      <dc:creator>hd1</dc:creator>
      <dc:date>2024-11-16T19:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Load aggregation of two variables from different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1672123#M728194</link>
      <description>&lt;P&gt;Would you be able to share the exact script you are trying?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 12:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1672123#M728194</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-04T12:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Load aggregation of two variables from different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1672402#M728195</link>
      <description>&lt;P&gt;Sure!&lt;BR /&gt;First Attempt using left Join:&amp;nbsp;&lt;BR /&gt;TableTemp:&lt;BR /&gt;Load&lt;BR /&gt;OrderNumber&lt;BR /&gt;num(Date(Floor([PreorderDate]))) as preorderDateNumber;&lt;BR /&gt;SELECT OrderNumber&lt;BR /&gt;PreorderDate&lt;BR /&gt;FROM DBMS."Preorders";&lt;BR /&gt;LEFT JOIN (TableTemp)&lt;BR /&gt;SQL SELECT PaymentDate&lt;BR /&gt;FROM DBMS."Payments" ;&lt;/P&gt;&lt;P&gt;preOrderToPayment:&lt;BR /&gt;Load&lt;BR /&gt;preorderDateNumber - num(Date(Floor(PaymentDate))) as P2PTime&lt;BR /&gt;Resident TableTemp;&lt;BR /&gt;Drop Table TableTemp;&lt;/P&gt;&lt;P&gt;Second Attempt using Concatenate:&lt;/P&gt;&lt;P&gt;Load&lt;BR /&gt;OrderNumber&lt;BR /&gt;num(Date(Floor([PreorderDate]))) as preorderDateNumber;&lt;BR /&gt;SELECT OrderNumber&lt;BR /&gt;PreorderDate&lt;BR /&gt;FROM DBMS."Preorders";&lt;/P&gt;&lt;P&gt;Concatenate Load&lt;BR /&gt;Date(Floor(PaymentDate)) as paymentDate ,&lt;/P&gt;&lt;P&gt;preorderDateNumber - num(Date(Floor(PaymentDate))) as P2PTime;&lt;BR /&gt;SELECT&lt;BR /&gt;PaymentDate&lt;/P&gt;&lt;P&gt;FROM DBMS."Payments";&lt;/P&gt;&lt;P&gt;In both i get the error that 'preorderDateNumber' doesn't exist&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also did try MAP but that didnt work either&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 07:08:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1672402#M728195</guid>
      <dc:creator>hd1</dc:creator>
      <dc:date>2020-02-05T07:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Load aggregation of two variables from different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1672531#M728196</link>
      <description>&lt;P&gt;Let's just look at the first attempt...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TableTemp:
LOAD OrderNumber
     Num(Date(Floor([PreorderDate]))) as preorderDateNumber;
SELECT OrderNumber
       PreorderDate
FROM DBMS."Preorders";

Left Join (TableTemp)
SQL SELECT PaymentDate
FROM DBMS."Payments";&lt;/LI-CODE&gt;&lt;P&gt;Do you have a single PaymentDate for all OrderNumbers? If not, then why are you not joining Payments to Preorders on OrderNumber? Right now... all you are doing is to join every single PaymentDate to every possible OrderNumber... this is a Cartesian product join... which will multiply your data several times.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 13:21:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1672531#M728196</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-02-05T13:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Load aggregation of two variables from different tables</title>
      <link>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1681487#M728197</link>
      <description>&lt;P&gt;If Sunny's last post got you on the right track with things, do not forget to return to the post and give him credit for the help by using the Accept as Solution button on his post.&amp;nbsp; If you did something different, please consider posting that, and then use the button on that post instead to close out the thread to let other Members know what did work.&amp;nbsp; If you still have questions, please leave an update, but do please try to close things out.&lt;/P&gt;&lt;P&gt;There is one thing I can leave you, below is a link to the Design Blog are of Community, there are lots of posts in this area regarding how-to items that may give you ideas on this or future situations, so be sure to bookmark this one for future reference.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 20:54:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-aggregation-of-two-variables-from-different-tables/m-p/1681487#M728197</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-03-03T20:54:03Z</dc:date>
    </item>
  </channel>
</rss>

