<?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 URGENT: Group by condition and rangesum in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/URGENT-Group-by-condition-and-rangesum-in-script/m-p/584573#M216992</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 have a problem that I am battling to figure out. Attached is the sample data with 2 additional fields preceded by the label 'desired'. These are the rules that need to be applied to correctly produce that value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Desired Output Rule&lt;/P&gt;&lt;P&gt;If the previous(PhoneNumber) is the same as the current PhoneNumber and not isnull(previous(FCRStatusValueFinal )) then sum all values in that group before the next null() value is encountered i.e. PhoneNumber 1234 has a value of 3 since all individual values meet the above condition and are summed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Desired Key Rule&lt;/P&gt;&lt;P&gt;For each group, add a integer value to represent that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, if anyone can assist with this it would be greatly appreciated. The reason for why I need it like this is because I want to then group by Key and Output and show how many 2, 3, 4, 5 callers there were. If you know of another way of getting this in script, by all means, please educate &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Byron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Apr 2014 09:59:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-04-16T09:59:23Z</dc:date>
    <item>
      <title>URGENT: Group by condition and rangesum in script</title>
      <link>https://community.qlik.com/t5/QlikView/URGENT-Group-by-condition-and-rangesum-in-script/m-p/584573#M216992</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 have a problem that I am battling to figure out. Attached is the sample data with 2 additional fields preceded by the label 'desired'. These are the rules that need to be applied to correctly produce that value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Desired Output Rule&lt;/P&gt;&lt;P&gt;If the previous(PhoneNumber) is the same as the current PhoneNumber and not isnull(previous(FCRStatusValueFinal )) then sum all values in that group before the next null() value is encountered i.e. PhoneNumber 1234 has a value of 3 since all individual values meet the above condition and are summed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Desired Key Rule&lt;/P&gt;&lt;P&gt;For each group, add a integer value to represent that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, if anyone can assist with this it would be greatly appreciated. The reason for why I need it like this is because I want to then group by Key and Output and show how many 2, 3, 4, 5 callers there were. If you know of another way of getting this in script, by all means, please educate &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Byron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 09:59:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/URGENT-Group-by-condition-and-rangesum-in-script/m-p/584573#M216992</guid>
      <dc:creator />
      <dc:date>2014-04-16T09:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT: Group by condition and rangesum in script</title>
      <link>https://community.qlik.com/t5/QlikView/URGENT-Group-by-condition-and-rangesum-in-script/m-p/584574#M216993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To add as an idea on how to achieve this, but still need someone to tell me how to do this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we create a new date value and let it assume the first date for each grouped value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i,e,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DateOld, DateNew&lt;/P&gt;&lt;P&gt;01 Jan, 01 Jan&lt;/P&gt;&lt;P&gt;02 Jan, 01 Jan&lt;/P&gt;&lt;P&gt;04 Jan, 01 Jan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I would have PhoneNumber, DateNew to group by and sum values for to get the correct result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope someone can attend to this shortly. Have to provide feedback in 2 hours &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Byron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 11:41:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/URGENT-Group-by-condition-and-rangesum-in-script/m-p/584574#M216993</guid>
      <dc:creator />
      <dc:date>2014-04-16T11:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Re: URGENT: Group by condition and rangesum in script</title>
      <link>https://community.qlik.com/t5/QlikView/URGENT-Group-by-condition-and-rangesum-in-script/m-p/584575#M216994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just looked into your desired output(without reading in detail what you want(I tend to do so for long describtive posts)).&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Input:&lt;BR /&gt;LOAD PhoneNumber, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FCRStatusValueFinalGroup, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FCRStatusValueFinal&lt;BR /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; [Desired Output], &lt;BR /&gt;//&amp;nbsp;&amp;nbsp;&amp;nbsp; [Desired Key]&lt;BR /&gt;FROM&lt;BR /&gt;[........\Sample FCR Data.xls]&lt;BR /&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;
&lt;P&gt;Left Join&lt;/P&gt;
&lt;P&gt;LOAD&lt;BR /&gt; PhoneNumber,&lt;BR /&gt; AutoNumber( PhoneNumber) as DesiredKey,&lt;BR /&gt; Sum(FCRStatusValueFinal) as DesiredOutput&lt;BR /&gt;Resident Input group By PhoneNumber;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;


&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 11:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/URGENT-Group-by-condition-and-rangesum-in-script/m-p/584575#M216994</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-16T11:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT: Group by condition and rangesum in script</title>
      <link>https://community.qlik.com/t5/QlikView/URGENT-Group-by-condition-and-rangesum-in-script/m-p/584576#M216995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tres,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. The solution you provided is close but does not include the one rule. Have a look at phone number 8901. That should be treated as 2 and 2, not 4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies for the long descriptive post, leaving out the detail would lead to an incorrect application of the rules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will take what you have done and see if I can figure out something with this. However, this post is still open &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; Need as much help as possible &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Byron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Apr 2014 12:54:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/URGENT-Group-by-condition-and-rangesum-in-script/m-p/584576#M216995</guid>
      <dc:creator />
      <dc:date>2014-04-16T12:54:26Z</dc:date>
    </item>
  </channel>
</rss>

