<?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 Accumulative sums - conditional in aggregation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Accumulative-sums-conditional-in-aggregation/m-p/1046773#M351830</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;the function i have from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2787"&gt;Accumulative Sums&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( aggr( rangesum( above( sum(Sales),0,12) ),Month, Store))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 different listobox: Black Store, White Store, Red Store with values attached to them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to have &lt;SPAN style="font-size: 13.3333px;"&gt;sum( aggr( rangesum( above( sum(Sales),0,12) ),Month, Black)) when i select one value from Black Store listbox.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;sum( aggr( rangesum( above( sum(Sales),0,12) ),Month, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if(getselectedcount(red)&amp;gt;0,red,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;if(getselectedcount(white)&amp;gt;0,&lt;SPAN style="font-size: 13.3333px;"&gt;white&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;if(getselectedcount(black)&amp;gt;0,&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;black)) but it doesnt work.&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;So my question is how can i put only names of columns to aggregation funtion? &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;Thank You in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Jacek Antek&lt;BR /&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Mar 2016 14:14:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-03-22T14:14:17Z</dc:date>
    <item>
      <title>Accumulative sums - conditional in aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulative-sums-conditional-in-aggregation/m-p/1046773#M351830</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;the function i have from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2787"&gt;Accumulative Sums&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( aggr( rangesum( above( sum(Sales),0,12) ),Month, Store))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 different listobox: Black Store, White Store, Red Store with values attached to them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to have &lt;SPAN style="font-size: 13.3333px;"&gt;sum( aggr( rangesum( above( sum(Sales),0,12) ),Month, Black)) when i select one value from Black Store listbox.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;sum( aggr( rangesum( above( sum(Sales),0,12) ),Month, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if(getselectedcount(red)&amp;gt;0,red,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;if(getselectedcount(white)&amp;gt;0,&lt;SPAN style="font-size: 13.3333px;"&gt;white&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;if(getselectedcount(black)&amp;gt;0,&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;black)) but it doesnt work.&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;So my question is how can i put only names of columns to aggregation funtion? &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;Thank You in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Jacek Antek&lt;BR /&gt;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 14:14:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulative-sums-conditional-in-aggregation/m-p/1046773#M351830</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-22T14:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sums - conditional in aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulative-sums-conditional-in-aggregation/m-p/1046774#M351831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can only use field names as dimensions in the aggr() function, no functions allowed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you can use a dollar sign expansion to evaluate your condition and replace with the output before the expression actually gets parsed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;sum( &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;aggr( &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rangesum( above( sum(Sales),0,12) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;,Month, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;$(=if(getselectedcount(red)&amp;gt;0,'red',&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;if(getselectedcount(white)&amp;gt;0,'&lt;SPAN style="font-size: 13.3333px;"&gt;white'&lt;/SPAN&gt;,&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;if(getselectedcount(black)&amp;gt;0,'&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;black')))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&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;edit:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Remember: red, white and black need to be fields in your data model, and QV is case sensitiv&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 15:15:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulative-sums-conditional-in-aggregation/m-p/1046774#M351831</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-03-22T15:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sums - conditional in aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulative-sums-conditional-in-aggregation/m-p/1046775#M351832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jacek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe i misunderstood but i tried to recreate your scenery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First you cant use the name of the column for the aggregarion funtion only values of a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I attach you an example, maybe can help you to make some changes on your model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Agustin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 15:29:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulative-sums-conditional-in-aggregation/m-p/1046775#M351832</guid>
      <dc:creator>agustinbobba</dc:creator>
      <dc:date>2016-03-22T15:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulative sums - conditional in aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulative-sums-conditional-in-aggregation/m-p/1046776#M351833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You Guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is working thanks to yours solution, Im happy &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 07:16:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulative-sums-conditional-in-aggregation/m-p/1046776#M351833</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-23T07:16:57Z</dc:date>
    </item>
  </channel>
</rss>

