<?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: Trouble with If Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trouble-with-If-Statement/m-p/1368882#M418608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you remove bold part you mention it is working, So that mean your condition may like below&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(wildmatch(vVariable,'abc'), sum(field1),&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum(field4)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So, Then What if you use something like below&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(wildmatch(vVariable,'abc'), sum(field2)-sum(field3),&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum(field5)-sum(field6))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Finally, You have extra parenthesis in your expression where i assume, I would ask you to try this, May be&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(wildmatch(vVariable,'abc'), sum(field1)+&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;(sum(field2)-sum(field3)),&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum(field4)+&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;(sum(field5)-sum(field6))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Instead of above one please use this - I removed and added one more red colour parenthesis("&lt;STRONG style=": ; color: #ff0000; font-size: 13.3333px; font-style: inherit; font-family: inherit;"&gt;(&lt;/STRONG&gt;" and "&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;") only&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(wildmatch(vVariable,'abc'), sum(field1)+(sum(field2)-sum(field3)),&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum(field4)+(sum(field5)-sum(field6)&lt;STRONG style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;)&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13.3333px; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jun 2017 01:49:37 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2017-06-28T01:49:37Z</dc:date>
    <item>
      <title>Trouble with If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-If-Statement/m-p/1368881#M418607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getting an odd result working with an If statement combined with Match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically trying to determine if a variable includes a specific string, then perform a calulation depending on whether the specific string is there or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(wildmatch(vVariable,'abc'), sum(field1)&lt;STRONG&gt;+((sum(field2)-sum(field3))&lt;/STRONG&gt;,&lt;SPAN style="font-size: 13.3333px;"&gt;sum(field4)&lt;STRONG&gt;+((sum(field5)-sum(field6)&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;what I'm experiencing is it will not perform the calculation when the variable does not contain 'abc'.&amp;nbsp; I know the calculations work as I have done them separately.&amp;nbsp; I've noticed this works fine if I remove the addition (the bold part).&amp;nbsp; Can I not do addition with If statement?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2017 23:08:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-If-Statement/m-p/1368881#M418607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-27T23:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-If-Statement/m-p/1368882#M418608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you remove bold part you mention it is working, So that mean your condition may like below&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(wildmatch(vVariable,'abc'), sum(field1),&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum(field4)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So, Then What if you use something like below&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(wildmatch(vVariable,'abc'), sum(field2)-sum(field3),&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum(field5)-sum(field6))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Finally, You have extra parenthesis in your expression where i assume, I would ask you to try this, May be&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(wildmatch(vVariable,'abc'), sum(field1)+&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;(sum(field2)-sum(field3)),&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum(field4)+&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;(sum(field5)-sum(field6))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Instead of above one please use this - I removed and added one more red colour parenthesis("&lt;STRONG style=": ; color: #ff0000; font-size: 13.3333px; font-style: inherit; font-family: inherit;"&gt;(&lt;/STRONG&gt;" and "&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;") only&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;If(wildmatch(vVariable,'abc'), sum(field1)+(sum(field2)-sum(field3)),&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum(field4)+(sum(field5)-sum(field6)&lt;STRONG style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;)&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 13.3333px; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2017 01:49:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-If-Statement/m-p/1368882#M418608</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-06-28T01:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-with-If-Statement/m-p/1368883#M418609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out.&amp;nbsp; It actually had to do with a string function issue (that I did not include in my post as I didnt think that was the issue).&amp;nbsp; Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2017 02:31:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-with-If-Statement/m-p/1368883#M418609</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-28T02:31:35Z</dc:date>
    </item>
  </channel>
</rss>

