<?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 Editing Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285834#M1201019</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could someone pls help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Nov 2010 09:50:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-02T09:50:22Z</dc:date>
    <item>
      <title>Editing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285831#M1201013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a small problem for which I am not able to find a solution. I have got three different tables which gives the Cost details for the product by different cost centers.&lt;/P&gt;&lt;P&gt;CostCentre1:&lt;/P&gt;&lt;P&gt;ProductID &amp;amp; Cost1&lt;/P&gt;&lt;P&gt;CostCentre2:&lt;/P&gt;&lt;P&gt;ProductID &amp;amp; Cost2&lt;/P&gt;&lt;P&gt;CostCentre3:&lt;/P&gt;&lt;P&gt;ProductID &amp;amp; Cost3&lt;/P&gt;&lt;P&gt;CostCentre4:&lt;/P&gt;&lt;P&gt;ProductID &amp;amp; Cost4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As all the four data files are coming from different sources, I load each seprately and then join them together . So my final table looks like&lt;/P&gt;&lt;P&gt;CostCentre:&lt;/P&gt;&lt;P&gt;ProductID, Cost1, Cost2, Cost3 , Cost4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now what I want to do is that I want to define a variable which counts how many cost centers allocated cost to the product &amp;amp; what was the maximum cost&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence my final table should look like&lt;/P&gt;&lt;P&gt;ProductID, Cost1, Cost2, Cost3 , Cost4, #Costs, MaxCost&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 12:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285831#M1201013</guid>
      <dc:creator />
      <dc:date>2010-11-01T12:54:02Z</dc:date>
    </item>
    <item>
      <title>Editing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285832#M1201015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;look at my example Script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;inline:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; ProductID, Cost1, Cost2, Cost3, Cost4&lt;BR /&gt; 1, 10, 20, 30, 40&lt;BR /&gt; 2, 100, 200, 300, 400&lt;BR /&gt; 3, 103, , 303, 403&lt;BR /&gt; 4, 1, 2, , 4&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;Join&lt;BR /&gt;Load&lt;BR /&gt; ProductID,&lt;BR /&gt; rangesum(&lt;BR /&gt; IF(Cost1 &amp;gt; 0, 1),&lt;BR /&gt; IF(Cost2 &amp;gt; 0, 1),&lt;BR /&gt; IF(Cost3 &amp;gt; 0, 1),&lt;BR /&gt; IF(Cost4 &amp;gt; 0, 1)) AS #Costs&lt;BR /&gt;Resident inline&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;Join&lt;BR /&gt;Load&lt;BR /&gt; ProductID,&lt;BR /&gt; rangemax(Cost1, Cost2, Cost3, Cost4) AS MaxCost&lt;BR /&gt;Resident inline&lt;BR /&gt;;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards, Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 14:05:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285832#M1201015</guid>
      <dc:creator />
      <dc:date>2010-11-01T14:05:53Z</dc:date>
    </item>
    <item>
      <title>Editing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285833#M1201017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ronald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the answer you have given lets say I need to rename a few fields and the 1st load reads as under:&lt;/P&gt;&lt;P&gt;inline:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; ProductID as ABC,&lt;BR /&gt; Cost1, Cost2, Cost3, Cost4&lt;BR /&gt; 1, 10, 20, 30, 40&lt;BR /&gt; 2, 100, 200, 300, 400&lt;BR /&gt; 3, 103, , 303, 403&lt;BR /&gt; 4, 1, 2, , 4];&lt;/P&gt;&lt;P&gt;What will be syntax of the remaining statements?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 14:21:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285833#M1201017</guid>
      <dc:creator />
      <dc:date>2010-11-01T14:21:30Z</dc:date>
    </item>
    <item>
      <title>Editing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285834#M1201019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could someone pls help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 09:50:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285834#M1201019</guid>
      <dc:creator />
      <dc:date>2010-11-02T09:50:22Z</dc:date>
    </item>
    <item>
      <title>Editing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285835#M1201021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, replace ProductID with ABC within the next two Load - Statements. Thats all.&lt;/P&gt;&lt;P&gt;RR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 10:02:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285835#M1201021</guid>
      <dc:creator />
      <dc:date>2010-11-02T10:02:14Z</dc:date>
    </item>
    <item>
      <title>Editing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285836#M1201023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load all the costs table data into a temporary table:&lt;BR /&gt;t1:&lt;BR /&gt;Load ProductId,&lt;BR /&gt;Cost1 as Cost&lt;BR /&gt;From...&lt;BR /&gt;Load ProductID,&lt;BR /&gt;Cost2 as Cost&lt;BR /&gt;From...&lt;/P&gt;&lt;P&gt;Now you can aggregate the data:&lt;BR /&gt;t2:&lt;BR /&gt;Load ProductID,&lt;BR /&gt;count(ProductId) as #Costs,&lt;BR /&gt;max(Cost) as MaxCost&lt;BR /&gt;Resident t1;&lt;/P&gt;&lt;P&gt;Drop table t1;&lt;/P&gt;&lt;P&gt;You now have table t2 which you can join to your other table (and then drop) or leave as is.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 10:05:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285836#M1201023</guid>
      <dc:creator />
      <dc:date>2010-11-02T10:05:29Z</dc:date>
    </item>
    <item>
      <title>Editing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285837#M1201025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't work that way. I am uploading a QV - pls have a look&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 10:24:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285837#M1201025</guid>
      <dc:creator />
      <dc:date>2010-11-02T10:24:28Z</dc:date>
    </item>
    <item>
      <title>Editing Script</title>
      <link>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285838#M1201027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the help finally sorted out the problem &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 12:32:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Editing-Script/m-p/285838#M1201027</guid>
      <dc:creator />
      <dc:date>2010-11-03T12:32:34Z</dc:date>
    </item>
  </channel>
</rss>

