<?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 not calculated with set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-not-calculated-with-set-analysis/m-p/154050#M502061</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Georg&lt;/P&gt;&lt;P&gt;I am not quite sure what you are trying to do, but I don't think that you need a set expression here, just sum(sales_amount) as your graph is already dimensioned by Zip_All.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Aug 2010 11:43:01 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2010-08-10T11:43:01Z</dc:date>
    <item>
      <title>Sum not calculated with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-not-calculated-with-set-analysis/m-p/154049#M502060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I try to make a result list that counts sales amounts for locations selected in another list by zip code.&lt;BR /&gt;the following is a simplified setup. That is why it might look a bit stupid--but it shows the problem I deal with.&lt;/P&gt;&lt;P&gt;sales:&lt;BR /&gt;ZIP_code sales_amount&lt;BR /&gt;012345 100&lt;BR /&gt;987655 150&lt;BR /&gt;333333 300&lt;/P&gt;&lt;P&gt;ZIP_codes:&lt;BR /&gt;ZIP_all&lt;BR /&gt;012345&lt;BR /&gt;222222&lt;BR /&gt;333333&lt;BR /&gt;888888&lt;BR /&gt;987654&lt;BR /&gt;&lt;BR /&gt;Now I want to have a diagramm/table with ...&lt;/P&gt;&lt;P&gt;dimension:&lt;BR /&gt;ZIP_all&lt;/P&gt;&lt;P&gt;formula:&lt;BR /&gt;=sum({&amp;lt; ZIP_code = {"=ZIP_all &amp;lt;= ZIP_code"} &amp;gt;} sales_amount)&lt;/P&gt;&lt;P&gt;If I select "22222" and "333333" it *should* return:&lt;/P&gt;&lt;P&gt;222222 100&lt;BR /&gt;333333 400&lt;/P&gt;&lt;P&gt;What it does return though is:&lt;/P&gt;&lt;P&gt;222222 0&lt;BR /&gt;333333 0&lt;/P&gt;&lt;P&gt;Obviously it that does not work, if more than one ZIP_all is selected from ZIP_codes. John wrote in another thread "A set is only build once per chart, not once per row". So I see that the set does not make sense if ZIP_all is a selection ov values.&lt;/P&gt;&lt;P&gt;But how else can I achieve this? How can I sum up values (one per line) that have an "condition".&lt;/P&gt;&lt;P&gt;I also tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;sum(&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;ZIP_ALL&lt;/B&gt; &amp;lt;= &lt;B&gt;ZIP_code&lt;/B&gt;), &lt;B&gt;sales_amount&lt;/B&gt;) &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But that gives a "0" result as well. I just don't see to make a "list of seperate sums based on a condition".&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Georg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 09:10:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-not-calculated-with-set-analysis/m-p/154049#M502060</guid>
      <dc:creator />
      <dc:date>2010-08-10T09:10:30Z</dc:date>
    </item>
    <item>
      <title>Sum not calculated with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-not-calculated-with-set-analysis/m-p/154050#M502061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Georg&lt;/P&gt;&lt;P&gt;I am not quite sure what you are trying to do, but I don't think that you need a set expression here, just sum(sales_amount) as your graph is already dimensioned by Zip_All.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 11:43:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-not-calculated-with-set-analysis/m-p/154050#M502061</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-08-10T11:43:01Z</dc:date>
    </item>
    <item>
      <title>Sum not calculated with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-not-calculated-with-set-analysis/m-p/154051#M502062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan,&lt;/P&gt;&lt;P&gt;thanks for picking up my issue. Please check again. I need to sum up elements &amp;lt;= ZIP_all, which results in a collecion of items. If it were =ZIP_all it would surely work like that.&lt;/P&gt;&lt;P&gt;I now did it with two dimensions ZIP_all and ZIP_codes and used as a formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;sum(&lt;/B&gt;&lt;B&gt;if&lt;/B&gt;(ZIP_ALL &amp;lt;= ZIP_code), &lt;B&gt;sales_amount)&lt;/B&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And then pivoted it with ZIP_all. T&lt;/STRONG&gt;&lt;B&gt;hat seems to work. But I feel still unsure if it really does and if this is the best solution. I think my problem is similar to this one: &lt;A href="http://community.qlik.com/forums/p/32278/124939.aspx"&gt;http://community.qlik.com/forums/p/32278/124939.aspx&lt;/A&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Best regards,&lt;BR /&gt;Georg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 12:58:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-not-calculated-with-set-analysis/m-p/154051#M502062</guid>
      <dc:creator />
      <dc:date>2010-08-10T12:58:48Z</dc:date>
    </item>
    <item>
      <title>Sum not calculated with set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-not-calculated-with-set-analysis/m-p/154052#M502064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Georg&lt;/P&gt;&lt;P&gt;As John Witherspoon says in that thread, set analysis is performed once for the whole model, not by chart dimension, so you can rule that out as the solution to your problem.&lt;/P&gt;&lt;P&gt;That leaves you with the sum-if approach. Without seeing your model, I can't be sure that what you outlined is correct, but if not, you seem to me to be on the right track.&lt;/P&gt;&lt;P&gt;If you would like to post your QVW file, I would be happy to have a look at it and possibly make a better suggestion.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Aug 2010 21:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-not-calculated-with-set-analysis/m-p/154052#M502064</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2010-08-10T21:23:25Z</dc:date>
    </item>
  </channel>
</rss>

