<?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: Set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720067#M258601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u suggest me the expression to calculate:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(flag=min(flag) sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Aug 2014 20:04:35 GMT</pubDate>
    <dc:creator>polisetti</dc:creator>
    <dc:date>2014-08-05T20:04:35Z</dc:date>
    <item>
      <title>Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720063#M258597</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;I have a pivot table as shown below. I need the sales in the sales column, but in the total row, i need only the sum of products having flag=x. Can anyone suggest some expression for the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="192"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="64"&gt;Product&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;Flag&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="64"&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;A&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;x&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;B&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;x&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;C&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;y&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none;"&gt;Total&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt; &lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we write an expression for sales as s&lt;STRONG style="text-decoration: underline;"&gt;um(sales) where flag is minimum&lt;/STRONG&gt;, the total row will consider only flag=x and I will be able to get the sales across each product as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions for the expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pollisetti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 19:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720063#M258597</guid>
      <dc:creator>polisetti</dc:creator>
      <dc:date>2014-08-05T19:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720064#M258598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=sum(&amp;lt;flag={'x'}&amp;gt;sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value wouldn't show for the 'y' flag, but the others should show 10 and 20 respectively with a total of 30 for the 2nd expression column&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 20:01:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720064#M258598</guid>
      <dc:creator>joshabbott</dc:creator>
      <dc:date>2014-08-05T20:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720065#M258599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(dimensionality()=0, sum({&amp;lt;Flag = {'x'}&amp;gt;}Sales), sum(Sales))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 20:01:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720065#M258599</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-08-05T20:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720066#M258600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want the value to be shown for Y as well but not to be considered in total&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 20:02:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720066#M258600</guid>
      <dc:creator>polisetti</dc:creator>
      <dc:date>2014-08-05T20:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720067#M258601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u suggest me the expression to calculate:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(flag=min(flag) sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 20:04:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720067#M258601</guid>
      <dc:creator>polisetti</dc:creator>
      <dc:date>2014-08-05T20:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720068#M258602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Flag={$(=min(Flag))}&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 20:06:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720068#M258602</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-08-05T20:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720069#M258603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can think of a lengthy workaround.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;1. Create expression containing the basic sales - Expr1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;= sales // Total here becomes null&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;2. Create second expression - Expr2&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;= sum(if(min(all flag) = flag,sales)) // Total here is sum of sales where flag is min&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;3. Create third expression which is based on first two&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;= if( Expr2 = 0, Expr1, Expr2) // This will give the column that you need&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;4. Hide the first two expressions.(option available in Presentation tab of chart properties)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 20:24:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/720069#M258603</guid>
      <dc:creator />
      <dc:date>2014-08-05T20:24:34Z</dc:date>
    </item>
  </channel>
</rss>

