<?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 Calculations in Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228212#M80268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sorry, slightly misleading there teh codes are arbitrary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Apr 2010 07:21:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-30T07:21:30Z</dc:date>
    <item>
      <title>Calculations in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228210#M80266</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 table bringing through all of my nominal ledger transactions and want to create a P&amp;amp;L account off the back of it. As multiple nominal codes go into each section is there an easy way of doing this in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie. cost of goods sold = Nominal codes 1000+2000+3000+4000&lt;/P&gt;&lt;P&gt;Overheads = Nominal codes 1500+2500+3500+4500&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The nominal codes are just a field in the transaction table but if I could create the expressions above in the script that would be great?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help much appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Apr 2010 17:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228210#M80266</guid>
      <dc:creator />
      <dc:date>2010-04-29T17:13:11Z</dc:date>
    </item>
    <item>
      <title>Calculations in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228211#M80267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you mean that when the code ends with "500" you want to add it to overhead, and if it ends with "000" you want to add it to COGS? You could just check this with Right(code,3) if that's the case. Or was this just an example and the codes are truly arbitrary?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Apr 2010 22:52:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228211#M80267</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2010-04-29T22:52:18Z</dc:date>
    </item>
    <item>
      <title>Calculations in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228212#M80268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sorry, slightly misleading there teh codes are arbitrary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 07:21:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228212#M80268</guid>
      <dc:creator />
      <dc:date>2010-04-30T07:21:30Z</dc:date>
    </item>
    <item>
      <title>Calculations in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228213#M80269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well if it really is arbitrary, then I don't see a way to automate filtering in the script, sorry.&lt;/P&gt;&lt;P&gt;This sort of calculation (just addition) is pretty light so it shouldn't be a problem to do this as an expression. If you just want to do the exact same thing in the script, there are several options. You could create a variable after your load and set it approximately like this: LET vCOGS = '=SUM(if(code=1000 or code=2000,fieldValue))';&lt;/P&gt;&lt;P&gt;This should result in a variable that contains the sum for the relevant fields. Depending on your other fields, you might also be able to do this with a group by. But like I said, simple addition of fields is probably best left for expressions (and will certainly be easier).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 08:02:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228213#M80269</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2010-04-30T08:02:22Z</dc:date>
    </item>
    <item>
      <title>Calculations in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228214#M80270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks doing the calculation is the easy bit in the expression as you say,my issue is more trying to display in a format that the People viewing would recognise&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales 1000&lt;/P&gt;&lt;P&gt;COGS 900&lt;/P&gt;&lt;P&gt;Gross Margin 100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a nice reading down table (like excel basically)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think I will have to persuade them otherwise - thanks for your speedy responses&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Apr 2010 08:09:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculations-in-Load-Script/m-p/228214#M80270</guid>
      <dc:creator />
      <dc:date>2010-04-30T08:09:15Z</dc:date>
    </item>
  </channel>
</rss>

