<?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: Sum, Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516056#M192684</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need set analysis for this. If I understand you correctly, you want one price per distinct combination of Product and store, and you want to average within this group. Hence&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(Avg(Price),Product,Store)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Aggr() returns an array of Prices that you then want to sum. Hence your formula is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Aggr(Avg(Price),Product,Store))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use this in a chart with Product as dimension, the chart will display one value per product (answer to question 1) and the total will be the answer to question 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Dec 2013 20:54:18 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2013-12-20T20:54:18Z</dc:date>
    <item>
      <title>Sum, Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516054#M192682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys! I need some help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to the table below as you answer my questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;right&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="width: 291px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="background-color: rgb(0, 128, 0); color: rgb(255, 255, 0); text-align: center;" width="64"&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; background-color: rgb(0, 128, 0); color: rgb(255, 255, 0); text-align: center;" width="64"&gt;&lt;STRONG&gt;Store&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl68" style="border-left: medium none; background-color: rgb(0, 128, 0); color: rgb(255, 255, 0); text-align: center;" width="64"&gt;&lt;STRONG&gt;Price&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; text-align: right; vertical-align: baseline; background-color: #008000;" width="99"&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;5.00&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;5.00&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;7.00&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;7.00&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;10.00&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;10.00&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;9.50&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;9.50&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;21.00&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;21.00&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;19.50&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;19.50&lt;/TD&gt;&lt;TD class="xl69" style="border-top: medium none; border-left: medium none; text-align: right; vertical-align: baseline;"&gt;SUP-2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a separate &lt;STRONG&gt;Object&lt;/STRONG&gt; that shows the &lt;STRONG&gt;Total Price&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Set Analysis, how can I output the:&lt;/P&gt;&lt;P&gt;1. Total for a "selected" Product&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For instance, Product A's Total Price is computed as 5.00 (Store 1 price) + 7.00 (Store 2 price) = 12.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I only need one price of the product for each store.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Total Price of ALL products (&lt;SPAN style="text-decoration: underline;"&gt;if no specific product is selected&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bearing in mind the above computation for a certain product, I need to get the Total Price for ALL products.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product A (12.00) + Product B (19.50) + Product C (40.50)&amp;nbsp; = 72.00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 20:40:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516054#M192682</guid>
      <dc:creator />
      <dc:date>2013-12-20T20:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sum, Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516055#M192683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to use the following expression for both:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(only(Price),Store,Product))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you select a product, it will only show the total for that selected product.&amp;nbsp; If you don't select a product, it will show the total of all products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**EDIT:&amp;nbsp; See attached example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 20:51:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516055#M192683</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2013-12-20T20:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Sum, Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516056#M192684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need set analysis for this. If I understand you correctly, you want one price per distinct combination of Product and store, and you want to average within this group. Hence&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aggr(Avg(Price),Product,Store)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Aggr() returns an array of Prices that you then want to sum. Hence your formula is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Aggr(Avg(Price),Product,Store))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use this in a chart with Product as dimension, the chart will display one value per product (answer to question 1) and the total will be the answer to question 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 20:54:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516056#M192684</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-12-20T20:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sum, Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516057#M192685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;=SUM(Aggr(sum(Distinct Price),Product,Store))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 20:54:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516057#M192685</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2013-12-20T20:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sum, Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516058#M192686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/4003"&gt;Henric Cronström&lt;/A&gt;'s use of avg() inside of the aggr() is probably the best option in case you have different prices for the same product within the same store.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 21:05:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516058#M192686</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2013-12-20T21:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sum, Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516059#M192687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for all of your help guys!&lt;/P&gt;&lt;P&gt;Happy holidays to you all! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 21:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Set-Analysis/m-p/516059#M192687</guid>
      <dc:creator />
      <dc:date>2013-12-20T21:37:40Z</dc:date>
    </item>
  </channel>
</rss>

