<?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 Avoiding Circular References in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089196#M362406</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everybody!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on a new data model trying to improve the existing one and I'm having a bit of a Circular Reference problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="C__Users_ShaharR_Desktop_expenses_test_test.qvw.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/111632_C__Users_ShaharR_Desktop_expenses_test_test.qvw.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;This is part of my model, every time I load the "expenses_total_sheet" (I would load one for each year in my DB) I want to assign the information to a certain year (since the data in that table is a single row per year)...&lt;/P&gt;&lt;P&gt;However if i just give it a:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year(MakeYear(2015)) as Year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I get a Circular Reference... how would you avoid that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jan 2016 13:43:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-01-14T13:43:58Z</dc:date>
    <item>
      <title>Avoiding Circular References</title>
      <link>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089196#M362406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everybody!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on a new data model trying to improve the existing one and I'm having a bit of a Circular Reference problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="C__Users_ShaharR_Desktop_expenses_test_test.qvw.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/111632_C__Users_ShaharR_Desktop_expenses_test_test.qvw.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;This is part of my model, every time I load the "expenses_total_sheet" (I would load one for each year in my DB) I want to assign the information to a certain year (since the data in that table is a single row per year)...&lt;/P&gt;&lt;P&gt;However if i just give it a:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Year(MakeYear(2015)) as Year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I get a Circular Reference... how would you avoid that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 13:43:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089196#M362406</guid>
      <dc:creator />
      <dc:date>2016-01-14T13:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding Circular References</title>
      <link>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089197#M362407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Iv'e tried adding a new field in "expenses_final" that would be called "expenses_total_year"&lt;/P&gt;&lt;P&gt;and having a corosponding field in "expenses_total_sheet".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This creates for me a Synthetic key which is working preety fine but I have seen some difference of opinions on using (and keeping) Synthetic keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you guys think?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 07:17:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089197#M362407</guid>
      <dc:creator />
      <dc:date>2016-01-15T07:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding Circular References</title>
      <link>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089198#M362408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2015&amp;nbsp; as&amp;nbsp; [Expense Year]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 07:26:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089198#M362408</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-01-15T07:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding Circular References</title>
      <link>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089199#M362409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your data is not very big, synthetic keys would not be a problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 07:35:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089199#M362409</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-01-15T07:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding Circular References</title>
      <link>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089200#M362410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The DataModel I'm trying to reconstruct is around 250MB...&lt;/P&gt;&lt;P&gt;I hope i can get it down as much as possible but would you say that counts as big?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 07:39:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089200#M362410</guid>
      <dc:creator />
      <dc:date>2016-01-15T07:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding Circular References</title>
      <link>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089201#M362411</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;Rename Year with some other name like [Expense Year]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Year(MakeYear(2015)) as &lt;SPAN style="font-size: 13.3333px;"&gt;[Expense Year]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 07:53:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089201#M362411</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2016-01-15T07:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding Circular References</title>
      <link>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089202#M362412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what I did...&lt;/P&gt;&lt;P&gt;And then i added that "[Expense Year]" to the expenses_final table (using&amp;nbsp; - Year(Date) as [Expense Year])...&lt;/P&gt;&lt;P&gt;Resulting in a Synthetic key, so far it's working great but I am worried of&amp;nbsp; preformance issues,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you think?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 08:00:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089202#M362412</guid>
      <dc:creator />
      <dc:date>2016-01-15T08:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding Circular References</title>
      <link>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089203#M362413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a technique to get the &lt;SPAN style="font-family: 'courier new', courier;"&gt;expenses_total_sheet_&lt;EM&gt;YYYY&lt;/EM&gt;&lt;/SPAN&gt; data correctly connected to &lt;SPAN style="font-family: 'courier new', courier;"&gt;expense_final&lt;/SPAN&gt;. I'm assuming that this is the right data model, as I have no information about what it should accomplish (and only part of it is visible):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. When loading expense_final, create a composite key like:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; portfolio &amp;amp; '|' &amp;amp; Year(Date) AS ExpenseTotalKey,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. When loading &lt;SPAN style="font-family: 'courier new', courier;"&gt;expense_total_sheet_&lt;EM&gt;YYYY&lt;/EM&gt;&lt;/SPAN&gt;, make sure that the year is available in a field or in the filename (if you load different years by using a LOAD * FROM [expense_total_sheet_*.abc]) or in a variable (if you use a FOR loop). Then rename the table to expense_total_sheet (it will contain all years, which makes it much simpler) and create a Key field like:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;portfolio &amp;amp; '|$(vYearFromFile)' AS ExpenseTotalKey,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if you use a variable (and a FOR loop), or like:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;portfolio &amp;amp; '|' &amp;amp; YearField AS ExpenseTotalKey,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if you use a field in the data source, or&lt;/P&gt;&lt;P style="font-size: 13.3333px; padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;portfolio &amp;amp; '|' &amp;amp; mid(FileName(), 21,4) AS ExpenseTotalKey,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if you need to lift the year from the file name. Note that the last technique must be adapted to your situation.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;3. Then drop the portfolio field in one of the two tables, or you will get a synthetic key as well.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Best,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 09:23:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089203#M362413</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-01-15T09:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Avoiding Circular References</title>
      <link>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089204#M362414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;STRONG style="font-size: 11.7px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/ShaharRo"&gt;ShaharRo&lt;/A&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My suggestion would be to work with composite key, as example below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//All years in expenses_total_sheet or one.&lt;/P&gt;&lt;P&gt;expenses_total_sheet:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Autonumber(&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MakeYear(2015)&lt;/STRONG&gt;&amp;amp;'_'&amp;amp;portfolio)&amp;nbsp;&amp;nbsp; as %YearPortfolio&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;portfolio,&lt;/P&gt;&lt;P&gt;profit_percent,&lt;/P&gt;&lt;P&gt;maam,&lt;/P&gt;&lt;P&gt;partner_loan&lt;/P&gt;&lt;P&gt;[&amp;lt;tablename&amp;gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expenses_final:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;EM&gt;Autonumber(&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MakeYear(2015)&lt;/STRONG&gt;&amp;amp;'_'&amp;amp;portfolio)&amp;nbsp;&amp;nbsp;&amp;nbsp; as %YearPortfolio&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;expense_type,&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;portfolio,&lt;/P&gt;&lt;P&gt;expense_ammount,&lt;/P&gt;&lt;P&gt;expense_sum&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;[&amp;lt;tablename&amp;gt;].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I hope this helps!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 12:42:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avoiding-Circular-References/m-p/1089204#M362414</guid>
      <dc:creator>jonas_rezende</dc:creator>
      <dc:date>2016-01-15T12:42:09Z</dc:date>
    </item>
  </channel>
</rss>

