<?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 when the sum is greater than a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-when-the-sum-is-greater-than-a-variable/m-p/1769351#M454506</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;count({&amp;lt;TYPE_CALENDRIER={'N'},ORIGIN={'FACTURES'}&amp;gt;}&lt;BR /&gt;distinct if(&lt;BR /&gt;aggr(sum({&amp;lt;TYPE_CALENDRIER={'N'},ORIGIN={'FACTURES'}&amp;gt;} [TONNAGE VENDU]), %CLIENT_ID)&amp;gt;=$(vINC1_VOL_MIN),&lt;BR /&gt;%CLIENT_ID))&lt;/P&gt;</description>
    <pubDate>Thu, 17 Dec 2020 20:41:59 GMT</pubDate>
    <dc:creator>lfholland</dc:creator>
    <dc:date>2020-12-17T20:41:59Z</dc:date>
    <item>
      <title>Count when the sum is greater than a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Count-when-the-sum-is-greater-than-a-variable/m-p/1769324#M454501</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to count clients that have made purchases over a target amount.&amp;nbsp; The target amount is in a variable: &lt;FONT color="#0000FF"&gt;vINC1_VOL_MIN&lt;/FONT&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've whittled down my expression to the following , but it is returning a count for any client that has ordered any amount :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;count( aggr( sum({$&amp;lt;TYPE_CALENDRIER={'N'},ORIGIN={'FACTURES'}&amp;gt;} [TONNAGE VENDU]), %CLIENT_ID)&amp;gt;=$(vINC1_VOL_MIN) )&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;My control table looks like this, as you can see the first column (the formula above) is returning a 1 for all lines, regardless of the sum of sales.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="leenlart_0-1608227642977.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45851iE97617B5C12D18A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="leenlart_0-1608227642977.png" alt="leenlart_0-1608227642977.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Where do I need to put the condition so that the count takes it into ... account ?&lt;/P&gt;&lt;P&gt;Thanks so much for your help!!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-when-the-sum-is-greater-than-a-variable/m-p/1769324#M454501</guid>
      <dc:creator>leenlart</dc:creator>
      <dc:date>2024-11-16T17:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Count when the sum is greater than a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Count-when-the-sum-is-greater-than-a-variable/m-p/1769351#M454506</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;count({&amp;lt;TYPE_CALENDRIER={'N'},ORIGIN={'FACTURES'}&amp;gt;}&lt;BR /&gt;distinct if(&lt;BR /&gt;aggr(sum({&amp;lt;TYPE_CALENDRIER={'N'},ORIGIN={'FACTURES'}&amp;gt;} [TONNAGE VENDU]), %CLIENT_ID)&amp;gt;=$(vINC1_VOL_MIN),&lt;BR /&gt;%CLIENT_ID))&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 20:41:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-when-the-sum-is-greater-than-a-variable/m-p/1769351#M454506</guid>
      <dc:creator>lfholland</dc:creator>
      <dc:date>2020-12-17T20:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count when the sum is greater than a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Count-when-the-sum-is-greater-than-a-variable/m-p/1769416#M454510</link>
      <description>&lt;P&gt;Brilliant!&lt;/P&gt;&lt;P&gt;Thanks so much for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 08:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-when-the-sum-is-greater-than-a-variable/m-p/1769416#M454510</guid>
      <dc:creator>leenlart</dc:creator>
      <dc:date>2020-12-18T08:54:33Z</dc:date>
    </item>
  </channel>
</rss>

