<?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 If Then Else with Sum Not Working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365662#M1179257</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, this worked. Thanks for your help! .... Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2012 14:30:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-03-28T14:30:08Z</dc:date>
    <item>
      <title>If Then Else with Sum Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365658#M1179253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Help, I am new to Qlikview and ready to go crazy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have SQL and .NET experience and I am trying to do something that is so easy using those tools.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my QVW document, I have a chart, and within that chart I am trying to build an Expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the simple English: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the rProcedure Class Code field has a value of 'MR', then sum the numeric value of the rUnits field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the QV syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If([rProcedure Class Code])='MR', Sum(rUnits))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get an Expression OK, but the If Then Else seems to have no effect on my chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I do not do the If Then Else, and simply sum rUnits, I get desired results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried doing an UPPER and TRIM, in case there were any extra characters or mixed case characters, with no success. And I checked the table for the existance of 'MR' and it was there. Seems so simple. What am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 17:27:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365658#M1179253</guid>
      <dc:creator />
      <dc:date>2012-03-22T17:27:33Z</dc:date>
    </item>
    <item>
      <title>If Then Else with Sum Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365659#M1179254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Bob,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You should use like this:&lt;/P&gt;&lt;P&gt;Sum(If([rProcedure Class Code]='MR', rUnits))&lt;BR /&gt;or&lt;BR /&gt;Sum({&amp;lt;[rProcedure Class Code]={'MR'}&amp;gt;} rUnits)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The second expression is using set analysis syntax.&lt;BR /&gt;It's very powerful functionality and useful.&lt;BR /&gt;You can refer it in the Help menu or reference manual.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it will help you.&lt;/P&gt;&lt;P&gt;Steve Kang.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 17:51:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365659#M1179254</guid>
      <dc:creator>jykang0638</dc:creator>
      <dc:date>2012-03-22T17:51:34Z</dc:date>
    </item>
    <item>
      <title>If Then Else with Sum Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365660#M1179255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The below expression works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(If([rProcedure Class Code]='MR', rUnits))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;[rProcedure Class Code]={'MR'}&amp;gt;} rUnits)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, attach sample data.&amp;nbsp; This helps in finding the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2012 06:30:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365660#M1179255</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-03-23T06:30:44Z</dc:date>
    </item>
    <item>
      <title>If Then Else with Sum Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365661#M1179256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! This worked fine ..... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just posted another question about automatically opening an external web page in a QV sheet, that is, the user does not click a link, rather, when entering the page, the web page "self deploys" to the sheet. Do you know anything about that? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bob &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 14:29:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365661#M1179256</guid>
      <dc:creator />
      <dc:date>2012-03-28T14:29:06Z</dc:date>
    </item>
    <item>
      <title>If Then Else with Sum Not Working</title>
      <link>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365662#M1179257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, this worked. Thanks for your help! .... Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 14:30:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Then-Else-with-Sum-Not-Working/m-p/365662#M1179257</guid>
      <dc:creator />
      <dc:date>2012-03-28T14:30:08Z</dc:date>
    </item>
  </channel>
</rss>

