<?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: Rows calculatein in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280893#M709264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Nima, &lt;/P&gt;&lt;P&gt;use this concatenate load:&lt;/P&gt;&lt;P&gt;table:&lt;BR /&gt;LOAD&lt;BR /&gt; Countries,&lt;BR /&gt; Sales,&lt;BR /&gt; Forecast&lt;BR /&gt;FROM &amp;lt;source&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CONCATENATE (table) LOAD&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; 'Canada + US' as Countries,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; sum(Sales) as Sales,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; sum(Forecast) as Forecast&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;RESIDENT table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE match(Countries,'Canada','US');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;EDIT:added "WHERE" line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Oct 2011 00:40:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-10-28T00:40:19Z</dc:date>
    <item>
      <title>Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280892#M709263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a calculation in script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 30%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Countries&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Forcast&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Canada&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;US&lt;/TD&gt;&lt;TD&gt;45&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Spain&lt;/TD&gt;&lt;TD&gt;32&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CAnada + US&lt;/TD&gt;&lt;TD&gt;85&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;What I want is to create the last line in the script.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2011 19:30:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280892#M709263</guid>
      <dc:creator />
      <dc:date>2011-10-27T19:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280893#M709264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Nima, &lt;/P&gt;&lt;P&gt;use this concatenate load:&lt;/P&gt;&lt;P&gt;table:&lt;BR /&gt;LOAD&lt;BR /&gt; Countries,&lt;BR /&gt; Sales,&lt;BR /&gt; Forecast&lt;BR /&gt;FROM &amp;lt;source&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CONCATENATE (table) LOAD&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; 'Canada + US' as Countries,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; sum(Sales) as Sales,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; sum(Forecast) as Forecast&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;RESIDENT table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;WHERE match(Countries,'Canada','US');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;EDIT:added "WHERE" line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 00:40:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280893#M709264</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-28T00:40:19Z</dc:date>
    </item>
    <item>
      <title>Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280894#M709265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: 'courier new', courier; font-size: 12px; background-color: #ffffff;"&gt;where MATCH(Countries,'Canada','US')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 02:04:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280894#M709265</guid>
      <dc:creator />
      <dc:date>2011-10-28T02:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280895#M709266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nima,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attached sample may help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 06:14:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280895#M709266</guid>
      <dc:creator />
      <dc:date>2011-10-28T06:14:16Z</dc:date>
    </item>
    <item>
      <title>Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280896#M709267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Correct, thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 10:02:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280896#M709267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-28T10:02:53Z</dc:date>
    </item>
    <item>
      <title>Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280897#M709268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try it with my real data , hope it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Nima&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 13:13:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280897#M709268</guid>
      <dc:creator />
      <dc:date>2011-10-28T13:13:55Z</dc:date>
    </item>
    <item>
      <title>Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280898#M709269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hello Micheal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another question for you. If we want to do a calculation like&amp;nbsp; Canada - Spain , how do we do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 13:27:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280898#M709269</guid>
      <dc:creator />
      <dc:date>2011-10-28T13:27:58Z</dc:date>
    </item>
    <item>
      <title>Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280899#M709270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nima,&lt;/P&gt;&lt;P&gt;It will be similar, the additional piece of code:&lt;/P&gt;&lt;P&gt;CONCATENATE (table) LOAD&lt;/P&gt;&lt;P&gt;'Canada + Spain' as Countries,&lt;/P&gt;&lt;P&gt;sum(Sales) as Sales,&lt;/P&gt;&lt;P&gt;sum(Forecast) as Forecast&lt;/P&gt;&lt;P&gt;RESIDENT table&lt;/P&gt;&lt;P&gt;WHERE match(Countries,'Canada','Spain');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 13:34:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280899#M709270</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-28T13:34:23Z</dc:date>
    </item>
    <item>
      <title>Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280900#M709271</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 mean if we want to Subtract canada from Spain&amp;nbsp; :&amp;nbsp;&amp;nbsp; Canada " - " Spain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can we do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 13:47:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280900#M709271</guid>
      <dc:creator />
      <dc:date>2011-10-28T13:47:05Z</dc:date>
    </item>
    <item>
      <title>Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280901#M709272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nima,&lt;/P&gt;&lt;P&gt;Why would you want to do it in the script?&amp;nbsp; This is something that more often makes sense (and much more flexible and easy) on the front-end.&lt;BR /&gt;Anyway, if it must be in the script for some reason, try this:&lt;BR /&gt;CONCATENATE (table) LOAD&lt;BR /&gt;'Canada - Spain' as Countries,&lt;BR /&gt;sum(if(Countries='Canada', Sales, - Sales) as Sales,&lt;BR /&gt;sum(if(Countries='Canada', Forecast, -Forecast) as Forecast&lt;BR /&gt;RESIDENT table&lt;BR /&gt;WHERE match(Countries,'Canada','Spain');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 14:01:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280901#M709272</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-28T14:01:02Z</dc:date>
    </item>
    <item>
      <title>Rows calculatein in script</title>
      <link>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280902#M709273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Michael,&lt;/P&gt;&lt;P&gt;I updated the discussion and add the real table as attachment. &lt;/P&gt;&lt;P&gt;The reason I need to do it in script is : If I have two measures for example Weight and Dollar and I want to the calculation , as far as I know it's not possible.If you take a look at the attached file you will see that I have weight in the report and I did my calculation in expression , like Sales+ Forecast and&amp;nbsp; it works for just Weight but if I have Dollar in the report as another measure there is no way to do it. &lt;/P&gt;&lt;P&gt;If you have any solution , I would appreciate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nima&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2011 14:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rows-calculatein-in-script/m-p/280902#M709273</guid>
      <dc:creator />
      <dc:date>2011-10-28T14:55:26Z</dc:date>
    </item>
  </channel>
</rss>

