<?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 Circular Reference - Loops in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637116#M233651</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a loop in my data model and is caused by 2 Fact tables having different granularities on 2 hierarchical dimension.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Some background:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have 2 facts, "Market Equity by Product" and "Market Value by Portfolio"&lt;/LI&gt;&lt;LI&gt;both facts have reference to [Report Date]&lt;/LI&gt;&lt;LI&gt;[Market Equity by Product] references [Product]&lt;/LI&gt;&lt;LI&gt;[Market Value by Portfolio] references [Portfolio]&lt;/LI&gt;&lt;LI&gt;Portfolio rolls-up to a Product (1 product - many portfolios), I think this is causing the LOOP as 1 fact has Portfolio granularity while the other fact has Product granularity&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How do I remove the LOOP while still being able to filter on [Product] on my 2 facts?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance for any help...&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Circular Reference.png" class="jive-image" src="/legacyfs/online/59014_Circular Reference.png" style="width: 620px; height: 335px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 May 2014 15:43:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-05-17T15:43:57Z</dc:date>
    <item>
      <title>Circular Reference - Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637116#M233651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a loop in my data model and is caused by 2 Fact tables having different granularities on 2 hierarchical dimension.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Some background:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I have 2 facts, "Market Equity by Product" and "Market Value by Portfolio"&lt;/LI&gt;&lt;LI&gt;both facts have reference to [Report Date]&lt;/LI&gt;&lt;LI&gt;[Market Equity by Product] references [Product]&lt;/LI&gt;&lt;LI&gt;[Market Value by Portfolio] references [Portfolio]&lt;/LI&gt;&lt;LI&gt;Portfolio rolls-up to a Product (1 product - many portfolios), I think this is causing the LOOP as 1 fact has Portfolio granularity while the other fact has Product granularity&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How do I remove the LOOP while still being able to filter on [Product] on my 2 facts?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance for any help...&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Circular Reference.png" class="jive-image" src="/legacyfs/online/59014_Circular Reference.png" style="width: 620px; height: 335px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 May 2014 15:43:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637116#M233651</guid>
      <dc:creator />
      <dc:date>2014-05-17T15:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Circular Reference - Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637117#M233652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This looks like something desperately in need of the&lt;EM&gt; applymap()&lt;/EM&gt; function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a look at this blog post that explains it.:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="j-search-result-title" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;A _jive_internal="true" class="j-search-result-value" href="https://community.qlik.com/blogs/qlikviewdesignblog/2012/09/18/one-favorite-function-applymap" style="margin: 0 0 3px; font-weight: bold; font-size: 15px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7;"&gt;Don't join - use &lt;EM class="jive-hilite" style="font-family: inherit; background-color: #ffffcd;"&gt;Applymap&lt;/EM&gt; instead&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 May 2014 15:58:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637117#M233652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-17T15:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Circular Reference - Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637118#M233653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, a link table could be an option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/05/17/concatenate-vs-link-table" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/05/17/concatenate-vs-link-table"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/05/17/concatenate-vs-link-table&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 May 2014 20:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637118#M233653</guid>
      <dc:creator>fkeuroglian</dc:creator>
      <dc:date>2014-05-17T20:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Circular Reference - Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637119#M233654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I looks as if a Portfolio always is associated with one Product only. If so, you should do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Portfolio2Product:&lt;/P&gt;&lt;P&gt;Mapping Load %Portfolio_Id, %Product_Id From Portfolio;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FactTable:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('Portfolio2Product',%Portfolio_Id) as %Product_Id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From [Market Value By Portfolio];&lt;/P&gt;&lt;P&gt;Concatenate &lt;/P&gt;&lt;P&gt;Load * From [Market Equity By Product];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then add all dimensions, with the small change that the Portfolio table should not contain Product any more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2014 12:41:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637119#M233654</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-05-18T12:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Circular Reference - Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637120#M233655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just &lt;STRONG&gt;rename&lt;/STRONG&gt; &lt;STRONG&gt;'%portfolio_Id'&lt;/STRONG&gt; your field from Portfolio table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because your are getting Portfolio details via Product table.&lt;/P&gt;&lt;P&gt;So that you access Portfolio data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore there is no need to link Portfolio table to Market Value By Portfolio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 May 2014 14:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637120#M233655</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-05-18T14:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Circular Reference - Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637121#M233656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A href="https://community.qlik.com/qlik-users/107217"&gt;Fernando Keuroglian&lt;/A&gt; the link lead me to another link which helped me resolve the issue. &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I used Generic keys to break the loop between portfolio and Product following the approach here &lt;A href="https://community.qlik.com/docs/DOC-3451"&gt;Generic keys&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Because of Generic keys, I was able to concatenate [Market Equity by Product] to [Market Value by Portfolio].&amp;nbsp; This seem to be a simpler solution than creating a &lt;STRONG&gt;Master Link Table &lt;/STRONG&gt;to join my 2 Facts&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the final model:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Circular Reference-fix.png" class="jive-image" src="/legacyfs/online/59106_Circular Reference-fix.png" style="width: 620px; height: 386px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:38:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637121#M233656</guid>
      <dc:creator />
      <dc:date>2014-05-19T13:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Circular Reference - Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637122#M233657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/4003"&gt;Henric Cronström&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like your solution to put %Product_Id in the Fact would have been a very good one too.&amp;nbsp; I actually followed the &lt;A href="https://community.qlik.com/docs/DOC-3451"&gt;Generic keys&lt;/A&gt; approach on your earlier post which worked perfectly with my requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll also keep this in mind as another approach. If I may ask, which of the 2 solutions would you normally use to solve Loop problems.&amp;nbsp; Thanks again for the help you are providing this community.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:48:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637122#M233657</guid>
      <dc:creator />
      <dc:date>2014-05-19T13:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Circular Reference - Loops</title>
      <link>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637123#M233658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I almost always use a concatenated fact table and not a link table. The concatenated fact table has much better performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 13:59:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Circular-Reference-Loops/m-p/637123#M233658</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-05-19T13:59:32Z</dc:date>
    </item>
  </channel>
</rss>

