<?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: Conditional Sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/34880#M5885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was quite successful the last few hours and even found another, even more simple code doing the same:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(count(Credits)&amp;gt;100,sum(Credits)/count(Credits))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2018 08:30:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-16T08:30:17Z</dc:date>
    <item>
      <title>Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/34877#M5882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi community!&lt;/P&gt;&lt;P&gt;Sorry for this probably very stupid question: I am a Qlikview beginner and am trying to solve the following problem:&lt;/P&gt;&lt;P&gt;I have a list with deliveries from different suppliers and credits for each delivery, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="265" style="border: 1px solid #000000; width: 156px; height: 180px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Delivery Number (Key)&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Supplier&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Credits&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;90&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I would like to display bar graphs showing the "average credits" for each supplier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; Diagram Formula: Sum(Credits)/Count(Credits) =&amp;gt; Works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I would like to narrow down the bar graph, so that it only show the average credits for suppliers that shipped, e.g. 100 times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried various set analysis versions, including aggr functions, but none seemed to work correctly.&lt;/P&gt;&lt;P&gt;My best bet would have been this one:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;({&amp;lt;&lt;/SPAN&gt;Credits&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: maroon;"&gt;"=count(Credits)&amp;gt;100"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;}&amp;gt;} &lt;/SPAN&gt;Credits&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;) /count(Credits)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial',sans-serif; color: black;"&gt;but also without success.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried to use the conditional option in properties:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="209" src="https://community.qlik.com/legacyfs/online/202441_pastedImage_8.png" width="429" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2018 12:41:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/34877#M5882</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-15T12:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/34878#M5883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Supplier = {"=Count(Credits) &amp;gt; 100"}&amp;gt;} Credits)/Count(Credits)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2018 16:04:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/34878#M5883</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-05-15T16:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/34879#M5884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your hint. It was not completely what I needed, but the key was to use "Supplier" instead of "Credits" within the condition. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; Here is the working code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Supplier = {"=Count(Credits) &amp;gt; 100"}&amp;gt;} Credits)/Count(&lt;STRONG&gt;{"=Count(Credits) &amp;gt; 100"} &lt;/STRONG&gt;Credits)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 08:27:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/34879#M5884</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-16T08:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/34880#M5885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was quite successful the last few hours and even found another, even more simple code doing the same:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(count(Credits)&amp;gt;100,sum(Credits)/count(Credits))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 08:30:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Sum/m-p/34880#M5885</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-16T08:30:17Z</dc:date>
    </item>
  </channel>
</rss>

