<?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: Count Distinct based on positive sum - Expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333692#M29175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to add FaktureMonth to Aggr()&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT Aggr(If(Sum(NETO) &amp;gt; 0,[Šifra artikla]),Komercijalist,FaktureMonth,[Šifra artikla]))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 May 2017 08:42:26 GMT</pubDate>
    <dc:creator>antoniotiman</dc:creator>
    <dc:date>2017-05-12T08:42:26Z</dc:date>
    <item>
      <title>Count Distinct based on positive sum - Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333686#M29169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i've got a small problem and i am hoping somebody can help me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 3 parameters in my table:&lt;/P&gt;&lt;P&gt;&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;Buyer&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;Šifra artikla&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;Neto&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;123 4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;123 4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;-200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;567 8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;567 8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;123 4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my formula: &lt;STRONG&gt;count(DISTINCT{&amp;lt;NETO = {"&amp;gt;0"}&amp;gt;}[Šifra artikla])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically the formula Counts the "Šifra artikla" where Neto is &amp;gt;0 per Buyer. &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;Buyer&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;Count&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem is, i don't want that. I want the formula to count where sum of neto per "Šifra artikla" is &amp;gt;0, so that the final result is:&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;Buyer&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;Count&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 06:30:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333686#M29169</guid>
      <dc:creator />
      <dc:date>2017-05-12T06:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct based on positive sum - Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333687#M29170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kristian,&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Neto&lt;/SPAN&gt;) &amp;gt; 0,&lt;SPAN style="color: #800000;"&gt;Sifra&lt;/SPAN&gt;),&lt;SPAN style="color: #800000;"&gt;Buyer&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;Sifra&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Antonio&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 07:33:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333687#M29170</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-05-12T07:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct based on positive sum - Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333688#M29171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately not. "Buyer" is a Dimension defined in Chart properties, so the result in your formula shows me 0 &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 07:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333688#M29171</guid>
      <dc:creator />
      <dc:date>2017-05-12T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct based on positive sum - Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333689#M29172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;NVM found the solution, i looked at the wrong stuff... here is the "working" formula:&lt;/P&gt;&lt;P&gt;"count({&amp;lt;[Šifra artikla] = {"=sum(NETO) &amp;gt; 0"}&amp;gt;} DISTINCT [Šifra artikla])"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you &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, 12 May 2017 07:48:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333689#M29172</guid>
      <dc:creator />
      <dc:date>2017-05-12T07:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct based on positive sum - Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333690#M29173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope... i was wrong my formula ain't right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 08:11:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333690#M29173</guid>
      <dc:creator />
      <dc:date>2017-05-12T08:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct based on positive sum - Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333691#M29174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My Bad... i didn't give enough information about the table. Your Formula is working with the information given...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately i forgot to mention that my table has a lot more fields like month, year...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when i make a Chart with -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimensions: Buyer, FaktureMonth&lt;/P&gt;&lt;P&gt;Expressions: &lt;STRONG&gt;Count(DISTINCT Aggr(If(Sum(NETO) &amp;gt; 0,[Šifra artikla]),Komercijalist,[Šifra artikla]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As long i select(Filter) only one month to display, your Formula works and gives me the correct amount. But if i select more months the number changes and is now wrong. Can you adjust the formula to work with filtered dimensions? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;wrong amounts(4 months selected):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Display with more months.JPG" class="jive-image image-1" src="/legacyfs/online/163115_Display with more months.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Correct amounts (month by month)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Display january.JPG" class="jive-image image-2" src="/legacyfs/online/163116_Display january.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Display February.JPG" class="jive-image image-3" src="/legacyfs/online/163117_Display February.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate your help, thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 08:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333691#M29174</guid>
      <dc:creator />
      <dc:date>2017-05-12T08:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct based on positive sum - Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333692#M29175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to add FaktureMonth to Aggr()&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT Aggr(If(Sum(NETO) &amp;gt; 0,[Šifra artikla]),Komercijalist,FaktureMonth,[Šifra artikla]))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 08:42:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333692#M29175</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-05-12T08:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct based on positive sum - Expression</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333693#M29176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. That helped.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 09:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-based-on-positive-sum-Expression/m-p/1333693#M29176</guid>
      <dc:creator />
      <dc:date>2017-05-12T09:05:52Z</dc:date>
    </item>
  </channel>
</rss>

