<?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 Why is this an error in Data Model ? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947456#M78072</link>
    <description>&lt;P&gt;Disclaimer, I'm new to Qlik and I'm trying to figure out what's wrong with such a model below.&lt;BR /&gt;&lt;BR /&gt;Qlik does not like such loop, so it seems I could either use "&lt;STRONG&gt;Master Calendar&lt;/STRONG&gt;" to link table 1 and 2 OR "&lt;STRONG&gt;Unique IDS&lt;/STRONG&gt;".&lt;/P&gt;
&lt;P&gt;Now let's say I just use "&lt;STRONG&gt;Master Calendar&lt;/STRONG&gt;" to link the tables, if I filter Table1 on &lt;EM&gt;Owner A&amp;nbsp;&amp;nbsp;&lt;/EM&gt;I'm still going to get all the &lt;EM&gt;Owner&lt;/EM&gt; of Table 2 matching the same date.&lt;/P&gt;
&lt;P&gt;And vice versa if I use&amp;nbsp;"&lt;STRONG&gt;Unique IDS&lt;/STRONG&gt;" instead I loose the connection on date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are standard type of query though and I'm sure there's a way to do it in Qlik but I don't know how.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/82509i92218CA6045984F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks !&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jun 2022 14:26:52 GMT</pubDate>
    <dc:creator>Derek_T</dc:creator>
    <dc:date>2022-06-23T14:26:52Z</dc:date>
    <item>
      <title>Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947456#M78072</link>
      <description>&lt;P&gt;Disclaimer, I'm new to Qlik and I'm trying to figure out what's wrong with such a model below.&lt;BR /&gt;&lt;BR /&gt;Qlik does not like such loop, so it seems I could either use "&lt;STRONG&gt;Master Calendar&lt;/STRONG&gt;" to link table 1 and 2 OR "&lt;STRONG&gt;Unique IDS&lt;/STRONG&gt;".&lt;/P&gt;
&lt;P&gt;Now let's say I just use "&lt;STRONG&gt;Master Calendar&lt;/STRONG&gt;" to link the tables, if I filter Table1 on &lt;EM&gt;Owner A&amp;nbsp;&amp;nbsp;&lt;/EM&gt;I'm still going to get all the &lt;EM&gt;Owner&lt;/EM&gt; of Table 2 matching the same date.&lt;/P&gt;
&lt;P&gt;And vice versa if I use&amp;nbsp;"&lt;STRONG&gt;Unique IDS&lt;/STRONG&gt;" instead I loose the connection on date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These are standard type of query though and I'm sure there's a way to do it in Qlik but I don't know how.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/82509i92218CA6045984F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks !&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 14:26:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947456#M78072</guid>
      <dc:creator>Derek_T</dc:creator>
      <dc:date>2022-06-23T14:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947470#M78073</link>
      <description>&lt;P&gt;Do not try to link these fact-tables just concatenate (union in sql) them - maybe adding an extra source-field to be able to differentiate with selections or set analysis to from which source which data come from.&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 14:34:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947470#M78073</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-06-23T14:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947475#M78074</link>
      <description>&lt;P&gt;Qlik uses an associative model. meaning when clicking a value other tables associated with this update with only those values.&lt;/P&gt;
&lt;P&gt;also for good practice fieldnames need to be unique so that there are no sync tables. with regards to the looping,&lt;/P&gt;
&lt;P&gt;try and create unique key values for your tables 1,2 and Unique IDS. after that also create those Key's for the Calender table.&amp;nbsp; this should fix the problem&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 14:39:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947475#M78074</guid>
      <dc:creator>MartW</dc:creator>
      <dc:date>2022-06-23T14:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947476#M78075</link>
      <description>&lt;P&gt;Thanks Marcus, I think that's the part I don't understand would you have any link to refer me to please ?&lt;BR /&gt;&lt;BR /&gt;Coming from PowerBI I thought this was how the data model worked, but I have the feeling it's not the exact same logic here.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 14:39:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947476#M78075</guid>
      <dc:creator>Derek_T</dc:creator>
      <dc:date>2022-06-23T14:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947479#M78076</link>
      <description>&lt;P&gt;Yes that's what I did, sorry it does not show in my mock up example. But in Qlik Table1 and Table2 have column Date1 and Date2 (same for ID) and the Master calendar as column Date1 and Date2 as well.&lt;BR /&gt;So they are unique keys and Qlik is not trying to associate Table1 and Table2 (with synthetic key on Date and ID.)&lt;BR /&gt;&lt;BR /&gt;But even then, it still does not like the that Table1 and Table2 are connected through 2 different tables. Whereas it makes perfect sense to me to be able to filter on a date range AND an ID (or Owner).&lt;BR /&gt;&lt;BR /&gt;It's been a couple of years since I used PowerBI but to my recollection these kinds of connections were allowed in the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 14:45:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947479#M78076</guid>
      <dc:creator>Derek_T</dc:creator>
      <dc:date>2022-06-23T14:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947482#M78077</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/186410"&gt;@Derek_T&lt;/a&gt;, can you share a screenshot of the datamodel viewer?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 14:47:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947482#M78077</guid>
      <dc:creator>MartW</dc:creator>
      <dc:date>2022-06-23T14:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947495#M78078</link>
      <description>&lt;P&gt;Like you have already observed a key on ID or Date wouldn't associate all table-parts else just the ones on which they are linked. A possible bypass would be to combine both fields within a single field for the association and renaming the origin fields to avoid the creation of synthetic keys or circular references.&lt;/P&gt;
&lt;P&gt;But it's often not enough because now you couldn't access both fields within the UI easily because they have different names and also connecting these tables with other dimension-tables.&lt;/P&gt;
&lt;P&gt;Further linking tables didn't solve any challenges if the relation-ship between the tables isn't 1:1 and/or if there are missing keys on one or even on both sides. Quite often it ends in creating a linking table between the fact-tables which contains the distinct concatenated keys from all fact-tables and on which the further dimensions are linked.&lt;/P&gt;
&lt;P&gt;By larger datasets this could become a performance-problem because such link-tables could grow much bigger as the fact-tables itself. Therefore why doing it more complicated as just concatenating the facts directly? Within the most scenarios it worked very well, is simple to create and leads to the officially recommended star-scheme data-model (as best compromise between efforts, maintainability and performance).&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 15:05:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947495#M78078</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-06-23T15:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947506#M78079</link>
      <description>&lt;P&gt;Here it is :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/82516i3A5AAB75277712F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 15:17:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947506#M78079</guid>
      <dc:creator>Derek_T</dc:creator>
      <dc:date>2022-06-23T15:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947524#M78084</link>
      <description>&lt;P&gt;Thank you, does that mean Qlik data Model does not support 1:n or n:n relationship ?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 15:48:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947524#M78084</guid>
      <dc:creator>Derek_T</dc:creator>
      <dc:date>2022-06-23T15:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947532#M78086</link>
      <description>&lt;P&gt;Of course it's possible to build valide data-models with such relationships but depending on the data and the requirements it might not always be trivial to merge them with join-approaches in the script and/or associating those tables in the data-model. Especially if there are also the mentioned missing keys - which would mean the attempt to link a value against NULL which couldn't work. That's not seldom, for example if you have sales without budgets or reverse - you won't be able to get a complete picture of them if any keys points against NULL.&lt;/P&gt;
&lt;P&gt;By simply adding such datasets with a concatenating respectively union all the linking-challenges wouldn't be there - neither between the fact-tables nor in regard to associate any dimensions. It's really so very simple.&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jun 2022 16:10:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1947532#M78086</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-06-23T16:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1949764#M78263</link>
      <description>&lt;P&gt;I found a solution to my problem:&lt;BR /&gt;&lt;BR /&gt;I created a "Link" table using Unique IDs and Master Calendar on which all tables are connected.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Load Distinct&lt;BR /&gt;ID&lt;BR /&gt;resident Unique IDs;&lt;/P&gt;
&lt;P&gt;Join&lt;BR /&gt;Load Distinct&lt;BR /&gt;DATE&lt;BR /&gt;Resident Master_Calendar;&lt;/P&gt;
&lt;P&gt;And created the Key =&amp;nbsp;ID &amp;amp; '-'&amp;nbsp;DATE in the Link Table as well as Table1 and Table2.&lt;BR /&gt;&lt;BR /&gt;Only issue I have with such an approach is that the Link Table size grow very quickly, especially if such a key involve more than 2 fields. So I'm still open to suggestion if there's a more efficient approach, I don't know if the Link table is stored in memory are recomputed every time it's queried.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 14:12:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1949764#M78263</guid>
      <dc:creator>Derek_T</dc:creator>
      <dc:date>2022-06-29T14:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1949819#M78270</link>
      <description>&lt;P&gt;The link-table is stored within the file and is also kept in memory and is used in all related UI objects to create the appropriate dimensional context within virtual tables on which the final aggregations are performed.&lt;/P&gt;
&lt;P&gt;In general such approach worked but from a performance point of view it's by larger data-sets usually not the best choice. Therefore my above suggestion not to create a link-table else to concatenate the fact-tables directly.&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 15:12:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1949819#M78270</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-06-29T15:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1949880#M78276</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp;,&amp;nbsp; would you have some code examples so I understand what you mean by concatenating the tables please ?&lt;BR /&gt;&lt;BR /&gt;In my simple example above Table 1 and 2 have the same 3 fields but in the real use case each table have around 30 fields each and most of them are completely different. So would concatenation still be a viable solution in this case ?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 18:37:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1949880#M78276</guid>
      <dc:creator>Derek_T</dc:creator>
      <dc:date>2022-06-29T18:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why is this an error in Data Model ?</title>
      <link>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1950094#M78291</link>
      <description>&lt;P&gt;Meant was something like:&lt;/P&gt;
&lt;P&gt;t: load F1, F2, F3, F4, F5, F6, 'X' as F10 from X;&lt;BR /&gt;concatenate(t)&amp;nbsp;load F1, F2, F3, F7, F8, F9, 'Y' as F10 from Y;&lt;/P&gt;
&lt;P&gt;That the table is then more or less asynchron is neither a technically problem nor must it cause performance or logically issues. How suitable it is in regard to the degree of asynchronous and/or to the size of the data-set and/or the UI requirements depends - especially compared to any alternatives and the efforts and side-effects which come with them.&lt;/P&gt;
&lt;P&gt;The above suggestion is further only the starting point to develop a data-model and doesn't mean that no further transformations are needed or at least sensible. For example it's possible and recommended to synchronize as many as possible of the field-names and their content, like SalesDate and BudgetDate which aren't not really different information and could be just renamed as Date - the needed context could you get from the source-information. Also measures like Sales and Budget could be kept within a single field - by many measure-fields you may further consider to transform the cross-table logic of them into a data-stream which means to create two fields for them - KPI &amp;amp; Value.&lt;/P&gt;
&lt;P&gt;This leads to rather long and small tables which may potentially have slight RAM and UI performance disadvantages against short and wide tables - but for us it worked very well and we use this approach nearly everywhere and we could improve our handling + performance significantly.&lt;/P&gt;
&lt;P&gt;Beside this some of the missing/wrong field-values might be cleaned/filled/prepared and/or outsourced in further dimension-tables and/or ...&lt;/P&gt;
&lt;P&gt;- Marcus&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jun 2022 08:13:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Why-is-this-an-error-in-Data-Model/m-p/1950094#M78291</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-06-30T08:13:49Z</dc:date>
    </item>
  </channel>
</rss>

