<?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: Function in Set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800906#M668584</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 use this formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum(Amount)&amp;gt;0,&lt;/P&gt;&lt;P&gt; count({&amp;lt;Filter={'Stock Amount'}&amp;gt;} DISTINCT shop_id) &lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it is that you need.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Nov 2014 23:23:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-21T23:23:32Z</dc:date>
    <item>
      <title>Function in Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800905#M668583</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;I have table like this:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="124" style="border: 1px solid rgb(0, 0, 0); width: 216px; height: 119px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Item&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Shop_id&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123453&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123453&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;863671&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;863671&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;A need to show users how much shops have amount &amp;gt;0 for each item. It looks too simple, but i have some trouble to show it.&lt;/P&gt;&lt;P&gt;i use&amp;nbsp; in my table item as dimension and&amp;nbsp; expression like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(distinct {&amp;lt;shop_id={"=sum(Amount)&amp;gt;0"}&amp;gt;} shop_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but it doesn't work, because for each my item it calculated both of this shops. This expression calculates total amount for each shop (ex. shop_id=2, amount=1 (1+0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Item&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Amount&amp;gt;0&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;123453&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;863671&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attach. Please help me with this set analysis. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 22:49:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800905#M668583</guid>
      <dc:creator />
      <dc:date>2014-11-21T22:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Function in Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800906#M668584</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 use this formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum(Amount)&amp;gt;0,&lt;/P&gt;&lt;P&gt; count({&amp;lt;Filter={'Stock Amount'}&amp;gt;} DISTINCT shop_id) &lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it is that you need.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 23:23:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800906#M668584</guid>
      <dc:creator />
      <dc:date>2014-11-21T23:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Function in Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800907#M668586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=SUM(Aggr(COUNT({&amp;lt;shop_id = {"=SUM(Amount)&amp;gt;0"}&amp;gt;}DISTINCT shop_id),item,shop_id))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Nov 2014 07:33:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800907#M668586</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-11-22T07:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Function in Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800908#M668587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=count(DISTINCT if(Amount&amp;gt;0, Shop_id))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Nov 2014 08:14:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800908#M668587</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-11-22T08:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: Function in Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800909#M668589</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;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({&amp;lt; &lt;STRONG&gt;Amount &lt;/STRONG&gt;= {"=sum({&amp;lt; Filter={'Stock Amount'}&amp;gt;}Amount)&amp;gt;0&amp;nbsp; "}&amp;gt;} DISTINCT shop_id)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you requires for only &amp;gt; 0 values in place of shop_id use &lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Nov 2014 08:35:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Function-in-Set-analysis/m-p/800909#M668589</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-11-22T08:35:01Z</dc:date>
    </item>
  </channel>
</rss>

