<?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 Re: Getting rid of loops in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753226#M591309</link>
    <description>&lt;P&gt;Primary Define Body has a 1 to 1 relationship with Defect ID but Governing Body is the grouping for the available hours. It just doesn't relate 1 to 1.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Oct 2020 14:10:55 GMT</pubDate>
    <dc:creator>cbaqir</dc:creator>
    <dc:date>2020-10-16T14:10:55Z</dc:date>
    <item>
      <title>Edit script to create new field</title>
      <link>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753030#M591307</link>
      <description>&lt;P&gt;I am adding in a couple of new tables and I am stuck on the scripting because of loops and at a loss for how to fix it. I have just added the RPT_EHRG_BUILD_HOURS, GovernanceCheckbook and xwalk tables.&amp;nbsp; The problem is that the xwalk is needed because some of the Governing Groups in the Governance Checkbook table are not a 1:1 match for the PRIMARY_DEFINE_BODY in the Fact table called EHRG_TICKET.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MY QUESTION: How can I edit the script to use the PRIMARY_DEFINE_BODY from the EHRG_TICKET table to do some logic to determine the applicable GOVERNING_GROUP (from the xwalk) and then write it as a new field to the&amp;nbsp;RPT_EHRG_BUILD_HOURS table?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;left join (RPT_EHRG_BUILD_HOURS)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;LOAD distinct (DEFECT_ID),[Governing Group]&amp;amp;'-'&amp;amp;monthstart(month) as %GG_MONTH_KEY&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Resident EHRG_TICKET;&lt;/EM&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;One or more loops have been detected in your database structure. Loops may cause ambiguous results and should therefore be avoided. Loop(s) will be cut by setting one or more tables as loosely coupled.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-10-15_16-11-16.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42392i6B5B89C05FA4F85D/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-10-15_16-11-16.jpg" alt="2020-10-15_16-11-16.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For example: ticket 814 should be Nursing Practice but the Governing Group in the top table shows No Define Needed, which isn't correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-10-15_16-16-56.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42394i159084C81CF6668B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-10-15_16-16-56.jpg" alt="2020-10-15_16-16-56.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:47:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753030#M591307</guid>
      <dc:creator>cbaqir</dc:creator>
      <dc:date>2024-11-15T23:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Getting rid of loops</title>
      <link>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753204#M591308</link>
      <description>&lt;P&gt;the obvious issue is with PRIMARY DEFINE BODY field.&amp;nbsp; you need to make a decision if this is related to DEFECT ID or GOVERNING BODY.&amp;nbsp; then remove it (or rename it) in the other table.&lt;/P&gt;&lt;P&gt;does it change with defect ID or will it change with governing body&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 13:43:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753204#M591308</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-10-16T13:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Getting rid of loops</title>
      <link>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753226#M591309</link>
      <description>&lt;P&gt;Primary Define Body has a 1 to 1 relationship with Defect ID but Governing Body is the grouping for the available hours. It just doesn't relate 1 to 1.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 14:10:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753226#M591309</guid>
      <dc:creator>cbaqir</dc:creator>
      <dc:date>2020-10-16T14:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Getting rid of loops</title>
      <link>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753307#M591310</link>
      <description>&lt;P&gt;I have an idea. If I can omit the xwalk and edit the script for the Build Hours table to add a field that shows the applicable Governing Body based on the Primary Define Body in the EHRG TICKET table, that might work. I am not sure how to do that.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 16:37:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753307#M591310</guid>
      <dc:creator>cbaqir</dc:creator>
      <dc:date>2020-10-16T16:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Edit script to create new field</title>
      <link>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753393#M591311</link>
      <description>&lt;P&gt;Ideally, your data model should be a star.&amp;nbsp; however, due to 1-to-many relationships, you may be forced to snow flake.&amp;nbsp; if you can collapse the tables well and good.&amp;nbsp; but that is not your problem.&amp;nbsp; again your problem if PrimaryDefineBody is on two associated tables which causes the link.&amp;nbsp; the first question to ask is should that field be associated to defect id or governing body?&amp;nbsp; if it is associated with defect id then just drop it from xwalk.&amp;nbsp; if for some reason you still need it (maybe you need to compare?), just rename it in xwalk.&amp;nbsp; and you have a simple change (i think).&lt;BR /&gt;&lt;BR /&gt;collapsing the tables in an existing data model would require more testing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edwin_0-1602900240721.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42504iF21E1A0C190C732C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edwin_0-1602900240721.png" alt="edwin_0-1602900240721.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;binary [gov checkbook grp.qvw];

NoConcatenate
Newxwalk:
load PRIMARY_DEFINE_BODY as PRIMARY_DEFINE_BODYFromxwalk,	[Governing Group]
Resident
xwalk;

drop table xwalk;

exit script;&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 17 Oct 2020 02:04:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753393#M591311</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-10-17T02:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Edit script to create new field</title>
      <link>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753395#M591312</link>
      <description>&lt;P&gt;with the new DM:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edwin_1-1602900552556.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/42505i586ED801465E872A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edwin_1-1602900552556.png" alt="edwin_1-1602900552556.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2020 02:09:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1753395#M591312</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-10-17T02:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Edit script to create new field</title>
      <link>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1756406#M591313</link>
      <description>&lt;P&gt;Following Design Blog should be of some help:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/Circular-References/ba-p/1469332" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/Circular-References/ba-p/1469332&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 27 Oct 2020 18:41:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Edit-script-to-create-new-field/m-p/1756406#M591313</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-10-27T18:41:56Z</dc:date>
    </item>
  </channel>
</rss>

