<?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 How to avoid loop between invoice and order? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062447#M355511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to make a data model of invoices and orders. I have three tables like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="1"&gt;&lt;STRONG&gt;Order&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;STRONG&gt;Invoice header&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;STRONG&gt;Invoice line&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Order_number&lt;/P&gt;&lt;P&gt;Place&lt;/P&gt;&lt;P&gt;Order_amount&lt;/P&gt;&lt;P&gt;Order_date&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Invoice_number&lt;/P&gt;&lt;P&gt;Order_mumber&lt;/P&gt;&lt;P&gt;Invoice_date&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Invoice_number&lt;/P&gt;&lt;P&gt;Place&lt;/P&gt;&lt;P&gt;Invoice_amount&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the script, QlikView warns me about a loop created by Order_number and Place, and the Invoice line table becomes loosely connected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an idea about how I could design this to avoid the loosely connected table? I want the user to be able to click on an order number and see connected orders and invoices (not all invoices have order numbers). At the same time, it should be possible to click on a place, and see everything ordered and invoiced at that place.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Feb 2016 09:39:04 GMT</pubDate>
    <dc:creator>hfkchristian</dc:creator>
    <dc:date>2016-02-18T09:39:04Z</dc:date>
    <item>
      <title>How to avoid loop between invoice and order?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062447#M355511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to make a data model of invoices and orders. I have three tables like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD colspan="1"&gt;&lt;STRONG&gt;Order&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;STRONG&gt;Invoice header&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD colspan="1"&gt;&lt;STRONG&gt;Invoice line&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Order_number&lt;/P&gt;&lt;P&gt;Place&lt;/P&gt;&lt;P&gt;Order_amount&lt;/P&gt;&lt;P&gt;Order_date&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Invoice_number&lt;/P&gt;&lt;P&gt;Order_mumber&lt;/P&gt;&lt;P&gt;Invoice_date&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Invoice_number&lt;/P&gt;&lt;P&gt;Place&lt;/P&gt;&lt;P&gt;Invoice_amount&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the script, QlikView warns me about a loop created by Order_number and Place, and the Invoice line table becomes loosely connected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an idea about how I could design this to avoid the loosely connected table? I want the user to be able to click on an order number and see connected orders and invoices (not all invoices have order numbers). At the same time, it should be possible to click on a place, and see everything ordered and invoiced at that place.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 09:39:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062447#M355511</guid>
      <dc:creator>hfkchristian</dc:creator>
      <dc:date>2016-02-18T09:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid loop between invoice and order?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062448#M355512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_145581993874850 jive_text_macro" jivemacro_uid="_145581993874850" modifiedtitle="true"&gt;
&lt;P&gt;Order:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Order_number,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Place AS Order_place,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount AS Order_amount,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Order_date&lt;/P&gt;
&lt;P&gt;......;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Invoice_header:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invoice_number,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Order_number,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invoice_date&lt;/P&gt;
&lt;P&gt;.......;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Invoice_line:&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Invoice_number,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Place AS Invoice_line_place,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount AS Line_amount&lt;/P&gt;
&lt;P&gt;.....;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will not falsely connect an invoice line amount with the order amount, not connect order place with invoice line place. The trick is to make each field more specific as to what they are representing independently from the table they are belonging to. So you keep the name for the two Order_number since they are really one and the same thing and should be used to connect Order and Invoice_header. Thus making it a key field to keep a correct association. The same goes for Invoice_number. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 18:24:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062448#M355512</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2016-02-18T18:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid loop between invoice and order?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062449#M355513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get rid of the loop if I join the Invoice_header and Invoice_line tables into a single Invoice table. But I know joins should be avoided in QlikView. Are there any special disadvanges about joining these tables like this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 09:12:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062449#M355513</guid>
      <dc:creator>hfkchristian</dc:creator>
      <dc:date>2016-02-19T09:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid loop between invoice and order?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062450#M355514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this particular case I would say it is good to join the tables. It is not always good to join tables. It is a balance between performance, the nature of the join, memory implications and clarity of the data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A join is performed in the Load Script and will thus not have performance implications for users when using the application. Not having an association between two tables and having them joined into one table will in many cases perform better. But again this depends on the number of fields in each table, the cardinality between them and also the size of each field in the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a general advice it is important to learn how to avoid loops and synthetic keys and understand it well if you want to create good data models.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 11:15:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062450#M355514</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2016-02-19T11:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid loop between invoice and order?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062451#M355515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; I will join the tables then.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 11:19:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-loop-between-invoice-and-order/m-p/1062451#M355515</guid>
      <dc:creator>hfkchristian</dc:creator>
      <dc:date>2016-02-19T11:19:08Z</dc:date>
    </item>
  </channel>
</rss>

