<?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: if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433739#M812224</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No you cant do this way better you add another field on the script for comparing this values and create another flag field. Lets say if they are same then 1 else 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if( [p-code]=[p-original],1,0) as FlagCompare&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;From Source;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Load *,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if( &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FlagCompare = 1&lt;/SPAN&gt;, [sell-price-new], [sell-price-new] / [p-master-pack]) as Contract_Selling_Price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Resident Data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Drop Table Data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Sep 2017 11:55:06 GMT</pubDate>
    <dc:creator>its_anandrjs</dc:creator>
    <dc:date>2017-09-28T11:55:06Z</dc:date>
    <item>
      <title>if statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433737#M812222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have an if statement as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([p-code]=[p-original],[sell-price-new],[sell-price-new]/[p-master-pack]) as Contract_Selling_Price,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to to and a condition to the above where [p-master-pack] is not 0 to add a value on another field called [split]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433737#M812222</guid>
      <dc:creator>dmxmikey</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433738#M812223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;I would like to to and a condition to the above where [p-master-pack] is not 0 to add a value on another field called [split]&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Not sure I understand this... can you may be re-explain?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 11:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433738#M812223</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-09-28T11:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433739#M812224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No you cant do this way better you add another field on the script for comparing this values and create another flag field. Lets say if they are same then 1 else 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if( [p-code]=[p-original],1,0) as FlagCompare&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;From Source;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Load *,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if( &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FlagCompare = 1&lt;/SPAN&gt;, [sell-price-new], [sell-price-new] / [p-master-pack]) as Contract_Selling_Price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Resident Data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Drop Table Data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 11:55:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433739#M812224</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-09-28T11:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433740#M812225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny is right, your explanation is a bit dubious in that it leaves much to speculation. For example, where do you want to add this extra clause, outside or inside the current IF call? Is it really 0 you want to test for, or NULL also?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if this is a correct interpretation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;IF ([p-code] = [p-original], [sell-price-new], [sell-price-new] / [p-master-pack]) +&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; IF (&lt;SPAN style="color: #3d3d3d; font-size: 13px;"&gt;[p-master-pack] &amp;lt;&amp;gt; 0, [split], 0) &lt;/SPAN&gt;AS Contract_Selling_Price,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Note that in a single column expression you can only manipulate the value of the current field, not two&amp;nbsp; fields at the same time.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 11:59:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433740#M812225</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-09-28T11:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433741#M812226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here instead of writing another condition in&lt;STRONG&gt; &lt;/STRONG&gt;same if condition,you can do it by&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(is not null(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; [p-master-pack] &lt;/SPAN&gt;),&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt; [p-master-pack] ) as &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt; [p-master-pack](split)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;after that in seperate load you can mention your condition&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;if([p-code]=[p-original],[sell-price-new],[sell-price-new]/[p-master-pack]) as Contract_Selling_Price&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 12:24:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433741#M812226</guid>
      <dc:creator>surendraj</dc:creator>
      <dc:date>2017-09-28T12:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433742#M812227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;meant to say add second condition on same statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 13:24:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433742#M812227</guid>
      <dc:creator>dmxmikey</dc:creator>
      <dc:date>2017-09-28T13:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: if statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433743#M812228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a guess as the question is not very clear:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if([p-code]=[p-original] and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[p-master-pack] &amp;lt;&amp;gt; 0&lt;/SPAN&gt;,[sell-price-new],[sell-price-new]/[p-master-pack]) as Contract_Selling_Price&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Good luck&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Oscar&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Sep 2017 19:12:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-statement/m-p/1433743#M812228</guid>
      <dc:creator>oscar_ortiz</dc:creator>
      <dc:date>2017-09-28T19:12:30Z</dc:date>
    </item>
  </channel>
</rss>

