<?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: calculating total in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257781#M397165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then first left join to create a single table and then aggregate like Staffan has shown above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Mar 2017 12:58:08 GMT</pubDate>
    <dc:creator>vinieme12</dc:creator>
    <dc:date>2017-03-22T12:58:08Z</dc:date>
    <item>
      <title>calculating total in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257774#M397158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have below like table in script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;Load * inline&lt;/P&gt;&lt;P&gt;[ clientID,BatchID&lt;/P&gt;&lt;P&gt;3,12&lt;/P&gt;&lt;P&gt;3,12&lt;/P&gt;&lt;P&gt;3,12&lt;/P&gt;&lt;P&gt;3,13&lt;/P&gt;&lt;P&gt;3,14&lt;/P&gt;&lt;P&gt;3,15&lt;/P&gt;&lt;P&gt;3,13&lt;/P&gt;&lt;P&gt;3,15&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2:&lt;/P&gt;&lt;P&gt;Load * inline&lt;/P&gt;&lt;P&gt;[BatchID,CampID,sales,advertise&lt;/P&gt;&lt;P&gt;12,2,23,21&lt;/P&gt;&lt;P&gt;12,3,4,5&lt;/P&gt;&lt;P&gt;12,4,3,6&lt;/P&gt;&lt;P&gt;13,5,46,87&lt;/P&gt;&lt;P&gt;14,6,12,23&lt;/P&gt;&lt;P&gt;15,7,34,12&lt;/P&gt;&lt;P&gt;13,8,56,2&lt;/P&gt;&lt;P&gt;15,9,23,5&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&amp;nbsp; (sum(sales)/sum(advertise)) as Percetage,&lt;/P&gt;&lt;P&gt;CampID&lt;/P&gt;&lt;P&gt;Resident Table2&amp;nbsp; Group By CampID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me Percentage for each &lt;SPAN style="font-size: 13.3333px;"&gt;CampID&lt;/SPAN&gt;, but i need to get&amp;nbsp; percentage &lt;SPAN style="font-size: 13.3333px;"&gt;( i.e sum(sales)/sum(advertise))&amp;nbsp; for clientID. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My result should be&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;clientID&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;Percetage&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.248&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Please help me on this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Supriya&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 10:42:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257774#M397158</guid>
      <dc:creator>berryandcherry6</dc:creator>
      <dc:date>2017-03-22T10:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: calculating total in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257775#M397159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use, Simple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;clientID&lt;/STRONG&gt; as Dimension&lt;/P&gt;&lt;P&gt;and expression should be &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;STRONG&gt;sum(sales)/sum(advertise) // &lt;/STRONG&gt;Because, clientID is already associate with you&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 11:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257775#M397159</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-03-22T11:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: calculating total in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257776#M397160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i need to this in script itself. Can i do this in script?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 11:02:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257776#M397160</guid>
      <dc:creator>berryandcherry6</dc:creator>
      <dc:date>2017-03-22T11:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: calculating total in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257777#M397161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your data sample doesn't seem right&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have the same client Id repeated for the same batch, which has 3 different rows in the second table this way you will have 3 x 3 rows for the same client id, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is that correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 11:18:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257777#M397161</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-03-22T11:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: calculating total in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257778#M397162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change Your script:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Table:&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[ clientID,BatchID&lt;BR /&gt;&amp;nbsp; 3,12 &lt;BR /&gt;3,12&lt;BR /&gt;&amp;nbsp; 3,12&lt;BR /&gt;&amp;nbsp; 3,13&lt;BR /&gt; 3,14&lt;BR /&gt; 3,15&lt;BR /&gt; 3,13&lt;BR /&gt; 3,15&lt;BR /&gt;&amp;nbsp; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;BR /&gt; Table2:&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Join&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;inline //Left Join here&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[BatchID,CampID,sales,advertise&lt;BR /&gt;&amp;nbsp; 12,2,23,21&lt;BR /&gt;&amp;nbsp; 12,3,4,5&lt;BR /&gt; 12,4,3,6&lt;BR /&gt;&amp;nbsp; 13,5,46,87&lt;BR /&gt;&amp;nbsp; 14,6,12,23&lt;BR /&gt;&amp;nbsp; 15,7,34,12&lt;BR /&gt;&amp;nbsp; 13,8,56,2 &lt;BR /&gt; 15,9,23,5&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt; New:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)/&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;advertise&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Percetage&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;clientID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Table&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Group&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;By&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;clientID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; //Group by clientID&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Drop&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Table; //Drop table&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 11:19:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257778#M397162</guid>
      <dc:creator>stabben23</dc:creator>
      <dc:date>2017-03-22T11:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: calculating total in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257779#M397163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check &lt;STRONG style="font-size: 11.7px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/stabben23"&gt;stabben23&lt;/A&gt;&lt;/STRONG&gt; Reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:46:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257779#M397163</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-03-22T12:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: calculating total in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257780#M397164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vineeth,&lt;/P&gt;&lt;P&gt;Sorry for delay reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, you are right we will have &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;3 x 3 rows for the same client id, beacuse each client has different batches.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could see below attached qvf file for better understanding. Let me know if you need more information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:52:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257780#M397164</guid>
      <dc:creator>berryandcherry6</dc:creator>
      <dc:date>2017-03-22T12:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: calculating total in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257781#M397165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;then first left join to create a single table and then aggregate like Staffan has shown above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:58:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257781#M397165</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-03-22T12:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: calculating total in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257782#M397166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, Anil. Its right according to this simple example,and giving expected output.&lt;/P&gt;&lt;P&gt;But my data model is little complex, here i am not getting how could i incorporate&amp;nbsp; &lt;STRONG style="font-size: 11.7px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/stabben23"&gt;stabben23&lt;/A&gt;&lt;/STRONG&gt; logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you or Staffan help me to solve this issue i have attached qvf file. Please help me on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:58:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-total-in-script/m-p/1257782#M397166</guid>
      <dc:creator>berryandcherry6</dc:creator>
      <dc:date>2017-03-22T12:58:32Z</dc:date>
    </item>
  </channel>
</rss>

