<?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: Additional fields in load script causes data integrity issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393243#M423322</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about the joins when you rename vs. when you don't rename? Does the synthetic key field change?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Sep 2017 23:34:21 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-09-11T23:34:21Z</dc:date>
    <item>
      <title>Additional fields in load script causes data integrity issue</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393240#M423319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having a bit of trouble in one of my load scripts. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 if statements that I'm using to calculate an availability metric. I'm doing this by partitioning on Resource and Period to get a count of records and dividing that count by the Availability value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i define the fields I intend to use it returns an incorrect result, however, when I use the * notation to select all relevant fields it returns the correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I load with my script as such: &lt;/P&gt;&lt;P&gt;Fact_Revenue:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;if(len(trim(#countResourcePeriodRecords_Temp))&amp;gt;0,#countResourcePeriodRecords_Temp,1) as #countResourcePeriodRecords,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(len(trim(Fact_Resource_Availability.#AvailableHours_Temp))&amp;gt;0,Fact_Resource_Availability.#AvailableHours_Temp, &lt;/P&gt;&lt;P&gt;if([Fact_Revenue_Employee.%EmployeeFlag] = 1,([Fact_Revenue_Employee.DefaultAvailability] * 160),(.875 * 160)))&lt;/P&gt;&lt;P&gt;/ &lt;/P&gt;&lt;P&gt;if(len(trim(#countResourcePeriodRecords_Temp))&amp;gt;0,#countResourcePeriodRecords_Temp,1) as #AvailableHours,&lt;/P&gt;&lt;P&gt;[Fact_Revenue_Employee.#Employee Salary] as [#Employee Salary],&lt;/P&gt;&lt;P&gt;Fact_Revenue_Employee.%EmployeeFlag as %EmployeeFlag,&lt;/P&gt;&lt;P&gt;Fact_Revenue_Employee.DefaultAvailability as #DefaultAvailableHours ,&lt;/P&gt;&lt;P&gt;[Fact_Revenue_Temp.#Est Fees] as [#Est Fees],&lt;/P&gt;&lt;P&gt;[Fact_Revenue_Temp.#Est Hrs] as [#Est Hrs],&lt;/P&gt;&lt;P&gt;Fact_Revenue_Temp.#Expenses as #Expenses,&lt;/P&gt;&lt;P&gt;[Fact_Revenue_Temp.#No of Hrs] as [#No of Hrs],&lt;/P&gt;&lt;P&gt;Fact_Revenue_Temp.#PRA_HoursInMonth as #PRA_HoursInMonth,&lt;/P&gt;&lt;P&gt;Fact_Revenue_Temp.#Revenue as #Revenue,&lt;/P&gt;&lt;P&gt;Fact_Revenue_Temp.#Total as #Total,&lt;/P&gt;&lt;P&gt;[Fact_Revenue_Temp.#Var Fees] as [#Var Fees],&lt;/P&gt;&lt;P&gt;[Fact_Revenue_Temp.#Var Hrs] as [#Var Hrs],&lt;/P&gt;&lt;P&gt;Fact_Revenue_Temp.PRA_Consultant as PRA_Consultant,&lt;/P&gt;&lt;P&gt;Fact_Revenue_Temp.PRA_Email as PRA_Email,&lt;/P&gt;&lt;P&gt;Fact_Revenue_Temp.PRA_Period as PRA_Period,&lt;/P&gt;&lt;P&gt;Fact_Revenue_Temp.PRA_ProjectId as PRA_ProjectId,&lt;/P&gt;&lt;P&gt;Period&lt;/P&gt;&lt;P&gt;Resident Fact_Revenue_Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this result:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="loadIssueNoStar.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/176179_loadIssueNoStar.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, if my load script is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fact_Revenue:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;if(len(trim(#countResourcePeriodRecords_Temp))&amp;gt;0,#countResourcePeriodRecords_Temp,1) as #countResourcePeriodRecords,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(len(trim(Fact_Resource_Availability.#AvailableHours_Temp))&amp;gt;0,Fact_Resource_Availability.#AvailableHours_Temp, &lt;/P&gt;&lt;P&gt;if([Fact_Revenue_Employee.%EmployeeFlag] = 1,([Fact_Revenue_Employee.DefaultAvailability] * 160),(.875 * 160)))&lt;/P&gt;&lt;P&gt;/ &lt;/P&gt;&lt;P&gt;if(len(trim(#countResourcePeriodRecords_Temp))&amp;gt;0,#countResourcePeriodRecords_Temp,1) as #AvailableHours,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Fact_Revenue_Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this result: &lt;/P&gt;&lt;P&gt;&lt;IMG alt="loadIssueStar.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/176186_loadIssueStar.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought it was naming convention or concatenation but I can't find any evidence of that. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Channing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 22:17:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393240#M423319</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T22:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: Additional fields in load script causes data integrity issue</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393241#M423320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you only have a single table in your application? &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Fact_Revenue or do you have more stuff? Also, do you drop &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Fact_Revenue_Temp at the end of the script?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;On a separate note, what is your chart expression? Do they use fields from single table (if you only have one table in your dashboard, this questions won't make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 22:28:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393241#M423320</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-11T22:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Additional fields in load script causes data integrity issue</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393242#M423321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have more tables in my application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am dropping the temp table after the load and re-naming of fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The straight table has 2 dimensions Resource (Different table) and Period (fact_Revenue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expressions are as follows &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;#countResourcePeriodRecords) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum(Fact_Revenue.#AvailableHours)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 22:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393242#M423321</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T22:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Additional fields in load script causes data integrity issue</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393243#M423322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about the joins when you rename vs. when you don't rename? Does the synthetic key field change?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 23:34:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393243#M423322</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-11T23:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Additional fields in load script causes data integrity issue</title>
      <link>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393244#M423323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was a long Monday. I wasn't including the key fields in my load script. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I did that, the relationships were created, and the values returned correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your mention of the synthetic key field change got me there though!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Channing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 13:21:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Additional-fields-in-load-script-causes-data-integrity-issue/m-p/1393244#M423323</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-12T13:21:48Z</dc:date>
    </item>
  </channel>
</rss>

