<?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: Sum if question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-if-question/m-p/1587640#M738721</link>
    <description>&lt;P&gt;I think you need to use an aggr() to enforce a calculation on the order number, for example with something like this (shortened the long fieldname):&lt;/P&gt;&lt;P&gt;sum(aggr(&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial black,avant garde"&gt;pick(match&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial black,avant garde"&gt;(-1, &lt;FONT color="#800000"&gt;amount&lt;/FONT&gt; &amp;gt; 1200, &lt;FONT color="#800000"&gt;amount&lt;/FONT&gt; &amp;gt; 500, &lt;FONT color="#800000"&gt;amount&lt;/FONT&gt; &amp;gt; 280, &lt;FONT color="#800000"&gt;amount&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="arial black,avant garde"&gt; &amp;gt; 150, &lt;FONT color="#800000"&gt;amount&lt;/FONT&gt; &amp;lt;= 150), 50, 32, 20, 13, 8),&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;Auftragsnummer))&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jun 2019 13:08:07 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2019-06-03T13:08:07Z</dc:date>
    <item>
      <title>Sum if question</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-question/m-p/1587467#M738719</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;I have a table that deals with the number of produced pieces&amp;nbsp; and the reasons for error.&lt;/P&gt;&lt;P&gt;Another point is the consideration of samples. The number of samples depends on the number of produced pieces.&lt;/P&gt;&lt;P&gt;Allocation:&lt;/P&gt;&lt;P&gt;produced (&amp;gt;150, &amp;gt;280, &amp;gt;500,&amp;gt;1200) -&amp;gt; samples(8,13,20,32,50)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to determine the result by an If -function.&lt;/P&gt;&lt;P&gt;If I use the formula for each order number, it works.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;FONT color="#0000ff"&gt;If&lt;/FONT&gt;(&lt;FONT color="#800000"&gt;MPS_productionorder.amount&lt;/FONT&gt; &amp;gt; 1200, 50, &lt;FONT color="#0000ff"&gt;if&lt;/FONT&gt;(&lt;FONT color="#800000"&gt;MPS_productionorder.amount&lt;/FONT&gt; &amp;gt; 500, 32, &lt;FONT color="#0000ff"&gt;if&lt;/FONT&gt;(&lt;FONT color="#800000"&gt;MPS_productionorder.amount&lt;/FONT&gt; &amp;gt; 280, 20, &lt;FONT color="#0000ff"&gt;if&lt;/FONT&gt;(&lt;FONT color="#800000"&gt;MPS_productionorder.amount&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="arial black,avant garde"&gt; &amp;gt; 150, 13, 8))))&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="funktioniert_sample.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13056i8FB395877711EA32/image-size/large?v=v2&amp;amp;px=999" role="button" title="funktioniert_sample.PNG" alt="funktioniert_sample.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But once I calculate the sum (by year/month)&amp;nbsp;it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial black,avant garde"&gt;&lt;FONT color="#0000ff"&gt;sum&lt;/FONT&gt;(&lt;FONT color="#0000ff"&gt;If&lt;/FONT&gt;(&lt;FONT color="#800000"&gt;MPS_productionorder.amount&lt;/FONT&gt; &amp;gt; 1200, 50, &lt;FONT color="#0000ff"&gt;if&lt;/FONT&gt;(&lt;FONT color="#800000"&gt;MPS_productionorder.amount&lt;/FONT&gt; &amp;gt; 500, 32, &lt;FONT color="#0000ff"&gt;if&lt;/FONT&gt;(&lt;FONT color="#800000"&gt;MPS_productionorder.amount&lt;/FONT&gt; &amp;gt; 280, 20, &lt;FONT color="#0000ff"&gt;if&lt;/FONT&gt;(&lt;FONT color="#800000"&gt;MPS_productionorder.amount&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="arial black,avant garde"&gt; &amp;gt; 150, 150, 8)))))&lt;/FONT&gt; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="smaple_neu.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13055i5C26194021126829/image-size/large?v=v2&amp;amp;px=999" role="button" title="smaple_neu.PNG" alt="smaple_neu.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an idea how I could solve the Problem?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:44:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-question/m-p/1587467#M738719</guid>
      <dc:creator>dominicanlauf</dc:creator>
      <dc:date>2024-11-16T20:44:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if question</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-question/m-p/1587469#M738720</link>
      <description>&lt;P&gt;P.S.: Doesn't work means the &lt;EM&gt;sum of samples&lt;/EM&gt;&amp;nbsp;is incorrect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 07:38:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-question/m-p/1587469#M738720</guid>
      <dc:creator>dominicanlauf</dc:creator>
      <dc:date>2019-06-03T07:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sum if question</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-if-question/m-p/1587640#M738721</link>
      <description>&lt;P&gt;I think you need to use an aggr() to enforce a calculation on the order number, for example with something like this (shortened the long fieldname):&lt;/P&gt;&lt;P&gt;sum(aggr(&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial black,avant garde"&gt;pick(match&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT face="arial black,avant garde"&gt;(-1, &lt;FONT color="#800000"&gt;amount&lt;/FONT&gt; &amp;gt; 1200, &lt;FONT color="#800000"&gt;amount&lt;/FONT&gt; &amp;gt; 500, &lt;FONT color="#800000"&gt;amount&lt;/FONT&gt; &amp;gt; 280, &lt;FONT color="#800000"&gt;amount&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="arial black,avant garde"&gt; &amp;gt; 150, &lt;FONT color="#800000"&gt;amount&lt;/FONT&gt; &amp;lt;= 150), 50, 32, 20, 13, 8),&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;Auftragsnummer))&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 13:08:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-if-question/m-p/1587640#M738721</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-06-03T13:08:07Z</dc:date>
    </item>
  </channel>
</rss>

