<?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 Sum If Problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-If-Problem/m-p/170297#M40778</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;Hope someone can help me with this, probably easy question, but I'm a beginner [:)]&lt;/P&gt;&lt;P&gt;I'm trying to get sum of salesprice if a number of conditions are present.&lt;/P&gt;&lt;P&gt;The first expression seems to get the right sum, but when I want to apply a condition more I can't seem to get the right result.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;Sum(if(Invoicestatus='Accept' and Invoicetype='Debet'or Invoicetype='Kredit', [Slv Salesprice]))&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P&gt;This seems to get the result I want here, but then I want to only get the sum where also field 'Vgr' are between 010 &amp;amp; 800&lt;/P&gt;&lt;P&gt;But I can't seem to get it right&lt;/P&gt;&lt;P style="margin: 0cm 0cm 10pt; tab-stops: 373.6pt;"&gt;Field Vgr have entry's from 010 to 999&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Niels&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Mar 2011 08:20:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-19T08:20:21Z</dc:date>
    <item>
      <title>Sum If Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-If-Problem/m-p/170297#M40778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;Hope someone can help me with this, probably easy question, but I'm a beginner [:)]&lt;/P&gt;&lt;P&gt;I'm trying to get sum of salesprice if a number of conditions are present.&lt;/P&gt;&lt;P&gt;The first expression seems to get the right sum, but when I want to apply a condition more I can't seem to get the right result.&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;Sum(if(Invoicestatus='Accept' and Invoicetype='Debet'or Invoicetype='Kredit', [Slv Salesprice]))&lt;/P&gt;&lt;P style="margin: 0cm 0cm 0pt; line-height: normal; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P&gt;This seems to get the result I want here, but then I want to only get the sum where also field 'Vgr' are between 010 &amp;amp; 800&lt;/P&gt;&lt;P&gt;But I can't seem to get it right&lt;/P&gt;&lt;P style="margin: 0cm 0cm 10pt; tab-stops: 373.6pt;"&gt;Field Vgr have entry's from 010 to 999&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Niels&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Mar 2011 08:20:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-If-Problem/m-p/170297#M40778</guid>
      <dc:creator />
      <dc:date>2011-03-19T08:20:21Z</dc:date>
    </item>
    <item>
      <title>Sum If Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-If-Problem/m-p/170298#M40779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If i understood your question properly,below is the solution.&lt;/P&gt;&lt;P&gt;Sum(if(Invoicestatus='Accept' and Invoicetype='Debet'or Invoicetype='Kredit' and (Vgr&amp;gt;=010 and Vgr&amp;lt;=888), [Slv Salesprice]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also write the same expression in Set analysis.&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Invoicestatus={'Accept'},Invoicetype={'Debet','Kredit'},VGR={"&amp;gt;=010&amp;lt;=888"}&amp;gt;}[Slv Salesprice])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;- Sridhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Mar 2011 10:08:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-If-Problem/m-p/170298#M40779</guid>
      <dc:creator />
      <dc:date>2011-03-19T10:08:43Z</dc:date>
    </item>
    <item>
      <title>Sum If Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-If-Problem/m-p/170299#M40780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think you need to nest your control statements correct, notice the extra parenthesis:&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;line-height:normal;"&gt;Sum(if( &lt;B&gt;(&lt;/B&gt;Invoicestatus='Accept' and Invoicetype='Debet'&lt;B&gt;)&lt;/B&gt; or Invoicetype='Kredit', [Slv Salesprice]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Mar 2011 11:02:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-If-Problem/m-p/170299#M40780</guid>
      <dc:creator>tseebach</dc:creator>
      <dc:date>2011-03-19T11:02:16Z</dc:date>
    </item>
  </channel>
</rss>

