<?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: script grouping doubt in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208631#M388051</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Rangesum(Below(total sum(NUM),0,4))&lt;/P&gt;&lt;P&gt;&lt;IMG alt="RangeSum.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143018_RangeSum.png" style="height: 391px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Nov 2016 22:36:42 GMT</pubDate>
    <dc:creator>el_aprendiz111</dc:creator>
    <dc:date>2016-11-04T22:36:42Z</dc:date>
    <item>
      <title>script grouping doubt</title>
      <link>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208630#M388050</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've a problem in the qlikview script. I'm extracting data from an oracle DB and I need to get some data, in the image below I describe the process&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="qlik1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/142930_qlik1.JPG" style="height: 354px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to sum the column NUM in groups of 4 consecutive hours. ¿How can I do that with the qlikview script?&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, 04 Nov 2016 10:25:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208630#M388050</guid>
      <dc:creator>juagarti</dc:creator>
      <dc:date>2016-11-04T10:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: script grouping doubt</title>
      <link>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208631#M388051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Juan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Rangesum(Below(total sum(NUM),0,4))&lt;/P&gt;&lt;P&gt;&lt;IMG alt="RangeSum.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143018_RangeSum.png" style="height: 391px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2016 22:36:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208631#M388051</guid>
      <dc:creator>el_aprendiz111</dc:creator>
      <dc:date>2016-11-04T22:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: script grouping doubt</title>
      <link>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208632#M388052</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;one script solution could be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_238689_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143069_QlikCommunity_Thread_238689_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14784632762703483 jive_text_macro" jivemacro_uid="_14784632762703483"&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUM,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HOUR,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DAY,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ZONE,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FROM [&lt;/SPAN&gt;&lt;A class="" data-containerid="-1" data-containertype="-1" data-objectid="252382" data-objecttype="13" href="https://community.qlik.com/servlet/JiveServlet/download/2051-238689-1154368-252382/data.xlsx"&gt;https://community.qlik.com/servlet/JiveServlet/download/1154368-252382/data.xlsx&lt;/A&gt;&lt;SPAN&gt;] (ooxml, embedded labels, table is Hoja1);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Join (table1)&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeSum(NUM,Previous(NUM),Previous(Previous(NUM)),Previous(Previous(Previous(NUM)))) as TOTAL&lt;/P&gt;
&lt;P&gt;Resident table1&lt;/P&gt;
&lt;P&gt;Order By ID desc;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Nov 2016 20:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208632#M388052</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-11-06T20:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: script grouping doubt</title>
      <link>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208633#M388053</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;Thanks for your answer, both run correctly and I can obtain the result. Now I have another problem. There aren´t only one zone and one day the are many days and many zone and I have to group the result with there. I have to use aggr function, for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Rangesum(Below(total sum(NUM),0,4))&amp;nbsp; -&amp;gt;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Rangesum(Below(total &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum( aggr(only(NUM), ZONE,DAY))&lt;/SPAN&gt;,0,4)) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;OR&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; list-style-position: initial; list-style-image: initial; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;table1:&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;LOAD RecNo() as ID,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUM,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HOUR,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DAY,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ZONE,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&lt;SPAN&gt;FROM [&lt;/SPAN&gt;&lt;A class="" data-containerid="-1" data-containertype="-1" data-objectid="252382" data-objecttype="13" href="https://community.qlik.com/servlet/JiveServlet/download/2051-238689-1154368-252382/data.xlsx"&gt;https://community.qlik.com/servlet/JiveServlet/download/1154368-252382/data.xlsx&lt;/A&gt;&lt;SPAN&gt;] (ooxml, embedded labels, table is Hoja1);&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;Join (table1)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;LOAD ID,&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeSum(NUM,Previous(NUM),Previous(Previous(NUM)),Previous(Previous(Previous(NUM)))) as TOTAL&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;Resident table1&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;Order By ID desc, Group by &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;DAY,&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;ZONE&lt;/SPAN&gt;&lt;/SPAN&gt;; &lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;but is doesn´t work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need that when the day is 21,22,23 only sum the data in the same ZONE and in the same DAY. I need that the operation are group by day and zone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attach a new data example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 09:59:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208633#M388053</guid>
      <dc:creator>juagarti</dc:creator>
      <dc:date>2016-11-07T09:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: script grouping doubt</title>
      <link>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208634#M388054</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;maybe like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_238689_Pic2.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/143152_QlikCommunity_Thread_238689_Pic2.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14785514956169181" jivemacro_uid="_14785514956169181"&gt;
&lt;P&gt;LOAD RecNo() as ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NUM,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HOUR,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DAY,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ZONE,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FROM [&lt;/SPAN&gt;&lt;A class="" data-containerid="-1" data-containertype="-1" data-objectid="252596" data-objecttype="13" href="https://community.qlik.com/servlet/JiveServlet/download/2051-238689-1155084-252596/data.xlsx"&gt;https://community.qlik.com/servlet/JiveServlet/download/1155084-252596/data.xlsx&lt;/A&gt;&lt;SPAN&gt;] (ooxml, embedded labels, table is Hoja1);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Join (table1)&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RangeSum(NUM,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(DAY&amp;amp;'|'&amp;amp;ZONE=Previous(DAY&amp;amp;'|'&amp;amp;ZONE),Previous(NUM)),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(DAY&amp;amp;'|'&amp;amp;ZONE=Previous(Previous(DAY&amp;amp;'|'&amp;amp;ZONE)),Previous(Previous(NUM))),&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(DAY&amp;amp;'|'&amp;amp;ZONE=Previous(Previous(Previous(DAY&amp;amp;'|'&amp;amp;ZONE))),Previous(Previous(Previous(NUM))))) as TOTAL&lt;/P&gt;
&lt;P&gt;Resident table1&lt;/P&gt;
&lt;P&gt;Order By ZONE,DAY,HOUR desc;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2016 20:45:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208634#M388054</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-11-07T20:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: script grouping doubt</title>
      <link>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208635#M388055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this run perfectly!!! Thanks very much!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 15:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208635#M388055</guid>
      <dc:creator>juagarti</dc:creator>
      <dc:date>2016-11-15T15:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: script grouping doubt</title>
      <link>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208636#M388056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you're welcome&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nice that it worked for you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2016 22:53:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/script-grouping-doubt/m-p/1208636#M388056</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2016-11-15T22:53:29Z</dc:date>
    </item>
  </channel>
</rss>

