<?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 Script:  Add New_Field showing max in Old_Field1 for groups of data in Old_Field2 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-Add-New-Field-showing-max-in-Old-Field1-for-groups-of/m-p/308453#M1198395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have existing fields as shown in left hand table below. (The objects below are Table Box objects - the one on the right shows the effect of my script on the one on the left.)&lt;/P&gt;&lt;P&gt;These fields are in table "Trans2" in my application. I am trying to add MAX_DEL to this table.&lt;/P&gt;&lt;P&gt;I have tried a number of load statements with various joins, all based around the script below, which at least seems to calculating the max value for each field correctly.&lt;/P&gt;&lt;P&gt;The problem is that it is creating a new Trans2-1 table which contains a row showing MAX_DEL for each SORDREF.&lt;/P&gt;&lt;P&gt;However in Trans2 there are multiple rows for some SORDREFs.&lt;/P&gt;&lt;P&gt;I need a script that will add the MAX_DEL field to each line in my Trans2 table showing the MAX_DEL per order for each row of the SORDREF, not create a new table as the script below does.&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;B&gt;LOAD&lt;/B&gt; SORDREF,&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;max(DEL_COUNT) as MAX_DEL&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;Resident Trans2&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;Group by SORDREF;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Feb 2011 15:23:36 GMT</pubDate>
    <dc:creator>mazacini</dc:creator>
    <dc:date>2011-02-24T15:23:36Z</dc:date>
    <item>
      <title>Script:  Add New_Field showing max in Old_Field1 for groups of data in Old_Field2</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Add-New-Field-showing-max-in-Old-Field1-for-groups-of/m-p/308453#M1198395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have existing fields as shown in left hand table below. (The objects below are Table Box objects - the one on the right shows the effect of my script on the one on the left.)&lt;/P&gt;&lt;P&gt;These fields are in table "Trans2" in my application. I am trying to add MAX_DEL to this table.&lt;/P&gt;&lt;P&gt;I have tried a number of load statements with various joins, all based around the script below, which at least seems to calculating the max value for each field correctly.&lt;/P&gt;&lt;P&gt;The problem is that it is creating a new Trans2-1 table which contains a row showing MAX_DEL for each SORDREF.&lt;/P&gt;&lt;P&gt;However in Trans2 there are multiple rows for some SORDREFs.&lt;/P&gt;&lt;P&gt;I need a script that will add the MAX_DEL field to each line in my Trans2 table showing the MAX_DEL per order for each row of the SORDREF, not create a new table as the script below does.&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;B&gt;LOAD&lt;/B&gt; SORDREF,&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;max(DEL_COUNT) as MAX_DEL&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;Resident Trans2&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;Group by SORDREF;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 15:23:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Add-New-Field-showing-max-in-Old-Field1-for-groups-of/m-p/308453#M1198395</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2011-02-24T15:23:36Z</dc:date>
    </item>
  </channel>
</rss>

