<?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/aggr/sum if sales = 0 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363649#M829313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like it's working. However I'm sure I tried that solution before, and it didn't worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jun 2017 07:28:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-06-28T07:28:28Z</dc:date>
    <item>
      <title>Count/aggr/sum if sales = 0</title>
      <link>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363645#M829309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to make a calculation that counts if a product on a customer has been discounted 100%.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So basically below is what I'm trying. I have tried several different ways but none of the give me the correct number. Below is my latest attempt, and this one isn't working at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(If((aggr(Sum({&amp;lt; Promotion={'Not specified'}, BookingDate = {'&amp;gt;=15-05-2017'}&amp;gt;} Sales)=0, Customer_Name, SalesPerson.SALNAME,SalgsGr.SGRNAME, OrderItem_ID,Order_Number, Promotion))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached a sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate all the help I can get &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363645#M829309</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count/aggr/sum if sales = 0</title>
      <link>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363646#M829310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you explain this in relation to the fields in your data model?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on your post above, are we looking here for a count of records where Sales = 0?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is the case, why not try adding a flag in to your load script? e.g.&lt;/P&gt;&lt;P&gt;if(Sales=0,1,0) as DiscountFlag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2017 07:59:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363646#M829310</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2017-06-27T07:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Count/aggr/sum if sales = 0</title>
      <link>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363647#M829311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I want to count whenever sales = 0, with above criteria taken into consideration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meaning I'll sum the sales based upon: &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Promotion={'Not specified'}, BookingDate = {'&amp;gt;=15-05-2017'}&amp;gt;} &lt;/STRONG&gt;&lt;STRONG&gt; &lt;/STRONG&gt;and several other criteria which are not included in this example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll prefer not to put it into the script, I prefer an expression in this instance. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2017 08:09:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363647#M829311</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-27T08:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Count/aggr/sum if sales = 0</title>
      <link>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363648#M829312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(&lt;/P&gt;&lt;P&gt;Aggr&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;If(Sum({&amp;lt;Promotion={'Not specified'}, BookingDate = {'&amp;gt;=15-05-2017'}&amp;gt;} Sales)=0,1,0),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Customer_Name, SalesPerson.SALNAME,SalgsGr.SGRNAME, OrderItem_ID,Order_Number, Promotion&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2017 08:16:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363648#M829312</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-06-27T08:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count/aggr/sum if sales = 0</title>
      <link>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363649#M829313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like it's working. However I'm sure I tried that solution before, and it didn't worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2017 07:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-aggr-sum-if-sales-0/m-p/1363649#M829313</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-28T07:28:28Z</dc:date>
    </item>
  </channel>
</rss>

