<?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 sum in script with multiple excel sheets (tabs) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sum-in-script-with-multiple-excel-sheets-tabs/m-p/155760#M31893</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 May 2010 10:26:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-19T10:26:24Z</dc:date>
    <item>
      <title>sum in script with multiple excel sheets (tabs)</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script-with-multiple-excel-sheets-tabs/m-p/155757#M31890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to do a sum in script where multiple excel sheets (jan,feb,mrt,apr etc) are loaded autimatically&lt;/P&gt;&lt;P&gt;(see &lt;A href="https://community.qlik.com/blogs/qlikviewblogs/archive/2008/09/29/loading-multiple-excel-sheets.aspx"&gt;http://community.qlik.com/blogs/qlikviewblogs/archive/2008/09/29/loading-multiple-excel-sheets.aspx&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Problem I have is that the sum is accumulated for all sheets while I want a sepperated sum for each sheet. I think the cause is the for next loop but don't know how to solve this problem:&lt;/P&gt;&lt;P&gt;If the sum(sales) for each month is 5&lt;/P&gt;&lt;P&gt;I get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 96pt; border-collapse: collapse;" width="128"&gt;&lt;COLGROUP&gt;&lt;COL span="2" style="width: 48pt;" width="64" /&gt;&lt;/COLGROUP&gt;&lt;TBODY&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD height="20" style="background-color: transparent; width: 48pt; height: 15pt; border: #f0f0f0;" width="64"&gt;&lt;/TD&gt;&lt;TD style="background-color: transparent; width: 48pt; border: #f0f0f0;" width="64"&gt;sum (Sales)&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD height="20" style="background-color: transparent; height: 15pt; border: #f0f0f0;"&gt;jan (sheet1)&lt;/TD&gt;&lt;TD align="right" style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD height="20" style="background-color: transparent; height: 15pt; border: #f0f0f0;"&gt;feb (sheet2)&lt;/TD&gt;&lt;TD align="right" style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD height="20" style="background-color: transparent; height: 15pt; border: #f0f0f0;"&gt;&lt;P&gt;mrt (sheet3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD align="right" style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I want:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 96pt; border-collapse: collapse;" width="128"&gt;&lt;TBODY&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD height="20" style="background-color: transparent; width: 48pt; height: 15pt; border: #f0f0f0;" width="64"&gt;&lt;/TD&gt;&lt;TD style="background-color: transparent; width: 48pt; border: #f0f0f0;" width="64"&gt;sum (Sales)&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD height="20" style="background-color: transparent; height: 15pt; border: #f0f0f0;"&gt;jan (sheet1)&lt;/TD&gt;&lt;TD align="right" style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD height="20" style="background-color: transparent; height: 15pt; border: #f0f0f0;"&gt;feb (sheet2)&lt;/TD&gt;&lt;TD align="right" style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="20" style="height: 15pt;"&gt;&lt;TD height="20" style="background-color: transparent; height: 15pt; border: #f0f0f0;"&gt;&lt;P&gt;mrt (sheet3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD align="right" style="BORDER-BOTTOM: #f0f0f0; BORDER-LEFT: #f0f0f0; BACKGROUND-COLOR: transparent; BORDER-TOP: #f0f0f0; BORDER-RIGHT: #f0f0f0"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 May 2010 08:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script-with-multiple-excel-sheets-tabs/m-p/155757#M31890</guid>
      <dc:creator />
      <dc:date>2010-05-19T08:26:12Z</dc:date>
    </item>
    <item>
      <title>sum in script with multiple excel sheets (tabs)</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script-with-multiple-excel-sheets-tabs/m-p/155758#M31891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that you have to operate in 3 steps :&lt;/P&gt;&lt;P&gt;- First you load your sales in a Temporary table&lt;/P&gt;&lt;P&gt;- Second you calculate your sum per month using SUM() and GROUP BY functions&lt;/P&gt;&lt;P&gt;- Finally you drop the temporary table&lt;/P&gt;&lt;P&gt;Here is an example :&lt;/P&gt;&lt;P&gt;_______________________________________&lt;/P&gt;&lt;P style="font-style: italic"&gt;Temp:&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; Month(Date) &lt;B&gt;as&lt;/B&gt; Month,&lt;/P&gt;&lt;P&gt;Sales&lt;/P&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;P&gt;test.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Jan);&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; Month(Date) &lt;B&gt;as&lt;/B&gt; Month,&lt;/P&gt;&lt;P&gt;Sales&lt;/P&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;P&gt;test.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Feb);&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; Month(Date) &lt;B&gt;as&lt;/B&gt; Month,&lt;/P&gt;&lt;P&gt;Sales&lt;/P&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;P&gt;test.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Mar);&lt;/P&gt;&lt;P style="font-style: italic"&gt;Sales:&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; Month, SUM(Sales)&lt;/P&gt;&lt;P&gt;&lt;B&gt;RESIDENT&lt;/B&gt; Temp&lt;/P&gt;&lt;P&gt;&lt;B&gt;GROUP&lt;/B&gt; &lt;B&gt;BY&lt;/B&gt; Month;&lt;/P&gt;&lt;P&gt;&lt;B&gt;DROP&lt;/B&gt; &lt;B&gt;TABLE&lt;/B&gt; &lt;I&gt;Temp;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;____________________________________________&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;hope this helps&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Olivier&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 May 2010 09:08:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script-with-multiple-excel-sheets-tabs/m-p/155758#M31891</guid>
      <dc:creator />
      <dc:date>2010-05-19T09:08:38Z</dc:date>
    </item>
    <item>
      <title>sum in script with multiple excel sheets (tabs)</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script-with-multiple-excel-sheets-tabs/m-p/155759#M31892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Once you connect excel to Qlikview via ODBC or OLEDB you`ll get TABLE_NAME as field. this must be your sheet name.&lt;/P&gt;&lt;P&gt;You can use this field in group by clause and sum up your sales. you`ll get the desired result.&lt;/P&gt;&lt;P&gt;-Peterson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 May 2010 09:17:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script-with-multiple-excel-sheets-tabs/m-p/155759#M31892</guid>
      <dc:creator />
      <dc:date>2010-05-19T09:17:16Z</dc:date>
    </item>
    <item>
      <title>sum in script with multiple excel sheets (tabs)</title>
      <link>https://community.qlik.com/t5/QlikView/sum-in-script-with-multiple-excel-sheets-tabs/m-p/155760#M31893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 May 2010 10:26:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sum-in-script-with-multiple-excel-sheets-tabs/m-p/155760#M31893</guid>
      <dc:creator />
      <dc:date>2010-05-19T10:26:24Z</dc:date>
    </item>
  </channel>
</rss>

