<?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 and or statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1680627#M592941</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp; Please help&lt;/P&gt;</description>
    <pubDate>Sat, 29 Feb 2020 12:31:15 GMT</pubDate>
    <dc:creator>sakshikaul</dc:creator>
    <dc:date>2020-02-29T12:31:15Z</dc:date>
    <item>
      <title>If and or statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1674632#M592936</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Below statement is giving an error&lt;/P&gt;&lt;P&gt;IF([Cost&amp;nbsp; excl. Tax]&amp;lt;=0,'Excluded','Check'='Excluded'&amp;nbsp;or &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if([Damage Tag]&amp;lt;&amp;gt;1&amp;nbsp;and&amp;nbsp;([Cost&amp;nbsp; excl. Tax]/Quantity&amp;lt;=1000),'Excluded','check')='Excluded'&amp;nbsp;or &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(&amp;nbsp;ApplyMap('Claim_Type',"Claim type [PAR]",'check')='EXCLUDED'&amp;nbsp;or &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if([Damage Tag]&amp;lt;&amp;gt;1,ApplyMap('Part_Number',Material,'check'))='EXCLUDED'),'EXCLUDED PART','REQUIRED PART'&amp;nbsp;&amp;nbsp;as&amp;nbsp;&amp;nbsp;A,&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 05:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1674632#M592936</guid>
      <dc:creator>sakshikaul</dc:creator>
      <dc:date>2020-02-12T05:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: If and or statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1674664#M592937</link>
      <description>&lt;P&gt;Your statement should be written like this, but I still don't think this will work:&lt;/P&gt;&lt;P&gt;IF([Cost excl. Tax]&amp;lt;=0,'Excluded','Check'='Excluded'&lt;BR /&gt;or if([Damage Tag]&amp;lt;&amp;gt;1 and ([Cost excl. Tax]/Quantity&amp;lt;=1000),'Excluded','check')='Excluded' or&lt;BR /&gt;if( ApplyMap('Claim_Type',"Claim type [PAR]",'check')='EXCLUDED' or&lt;BR /&gt;if([Damage Tag]&amp;lt;&amp;gt;1,ApplyMap('Part_Number',Material,'check'))='EXCLUDED','EXCLUDED PART','REQUIRED PART')) as A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suppose you are using this with load, so this is how you do it:&lt;/P&gt;&lt;P&gt;IF([Cost excl. Tax]&amp;lt;=0,'Excluded', //checks the first condition, if true then Excluded else&lt;BR /&gt;if([Damage Tag]&amp;lt;&amp;gt;1 and ([Cost excl. Tax]/Quantity&amp;lt;=1000),'Excluded',&amp;nbsp; //checks both conditions, if true Excluded, else&lt;/P&gt;&lt;P&gt;if( ApplyMap('Claim_Type',"Claim type [PAR]")='EXCLUDED','Excluded',&amp;nbsp; //this is where I have trouble finding out what you want to do. however if the map give value EXCLUDED it changes to Excluded, else&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if([Damage Tag]&amp;lt;&amp;gt;1,ApplyMap('Part_Number',Material),'EXCLUDED PART')))) as A //and the last condition is strangest. Now if the condition is true, it uses ApplyMap, if not value is Excluded part&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 07:35:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1674664#M592937</guid>
      <dc:creator>DavidM</dc:creator>
      <dc:date>2020-02-12T07:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: If and or statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1674707#M592938</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Basically I have excel formulas for each condition which i have converted to qlikview script like&amp;nbsp;&lt;/P&gt;&lt;P&gt;condition 1-=excel formula ---&amp;gt; =IF(AF22&amp;lt;=0,"EXCLUSIVE","CHECK")&lt;/P&gt;&lt;P&gt;converted to qlikview&amp;nbsp; script---&amp;gt;if&lt;SPAN&gt;([Cost excl. Tax]&amp;lt;=0,'Excluded','check' ) as&amp;nbsp;Debit note/cancelled claim ( - cost values),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;condition 2= excel formula---&amp;gt;&amp;nbsp;=AJ22IF(AF22&amp;lt;=0,"EXCLUSIVE","CHECK")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;converted to qlikview script----&amp;gt;&amp;nbsp;if([Damage Tag]&amp;lt;&amp;gt;1 and ([Cost excl. Tax]/Quantity&amp;lt;=1000),'Excluded','check' as&amp;nbsp;Consequential parts:Per part cost&amp;lt;=1000 status,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;condition 3 = excel formula---&amp;gt;=IFERROR(VLOOKUP(V22,MASTER!A:C,3,0),"CHECK")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;converted to qlikview script---&amp;gt;&amp;nbsp;&amp;nbsp;ApplyMap('Claim_Type',"Claim type [PAR]",'check') as excluded claim type,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;condition 4 =excel formula ---&amp;gt;&amp;nbsp;=IFERROR(IF(E22&amp;lt;&amp;gt;"1",(VLOOKUP(Z22,MASTER!$G:$I,3,0)),"CHECK"),"CHECK")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;converted to qlikview---&amp;gt;&amp;nbsp;if([Damage Tag]&amp;lt;&amp;gt;1,ApplyMap('Part_Number',Material,'check'),'check)' as excluded parts&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;finally, now I want to combine all the above conditions into one line and create a new field in qlikview so for that given excel formula is&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;condition 5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=IFERROR(IF(OR(AH22="EXCLUSIVE",AJ22="EXCLUSIVE",AK22="EXCLUSIVE",AL22="EXCLUSIVE"),"EXCLUSIVE PART","REQUIRED PART"),"EXCLUSIVE PART")&lt;/P&gt;&lt;P&gt;qlikview script----&amp;gt; a&lt;U&gt;&lt;STRONG&gt;s suggested by you is giving wrong output&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;F([Cost excl. Tax]&amp;lt;=0,'Excluded', //checks the first condition, if true then Excluded else&lt;BR /&gt;if([Damage Tag]&amp;lt;&amp;gt;1 and ([Cost excl. Tax]/Quantity&amp;lt;=1000),'Excluded',&amp;nbsp; //checks both conditions, if true Excluded, else&lt;/P&gt;&lt;P&gt;if( ApplyMap('Claim_Type',"Claim type [PAR]")='EXCLUDED','Excluded',&amp;nbsp; //this is where I have trouble finding out what you want to do. however if the map give value EXCLUDED it changes to Excluded, else&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if([Damage Tag]&amp;lt;&amp;gt;1,ApplyMap('Part_Number',Material),'EXCLUDED PART')))) as A //and the last condition is strangest. Now if the condition is true, it uses ApplyMap, if not value is Excluded part&lt;/P&gt;&lt;P&gt;Please check all the above given conditions and help me in combing all the conditions(&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;creating condition 5&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;, as stated &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;above)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt; in one line in qlikview script.&lt;/P&gt;&lt;P&gt;I dont know where I am going wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 09:14:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1674707#M592938</guid>
      <dc:creator>sakshikaul</dc:creator>
      <dc:date>2020-02-12T09:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: If and or statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1674728#M592939</link>
      <description>&lt;P&gt;You cannot combine those statements with OR, it makes no sense. Condition 3 is no condition, just mapping with 'check' for values which are not found in map. Maybe this will work:&lt;/P&gt;&lt;P&gt;iF([Cost excl. Tax]&amp;lt;=0,'Excluded',&lt;BR /&gt;if([Damage Tag]&amp;lt;&amp;gt;1 and ([Cost excl. Tax]/Quantity&amp;lt;=1000),'Excluded',&lt;/P&gt;&lt;P&gt;if([Damage Tag]&amp;lt;&amp;gt;1,ApplyMap('Part_Number',Material,'check'),&lt;/P&gt;&lt;P&gt;ApplyMap('Claim_Type',"Claim type [PAR]",'check')))) as A&lt;/P&gt;&lt;P&gt;This way you will get values Excluded and Check but there is no other value (except those from Applymap). Basically whatever doesn't fit the first two conditions will go the last&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 09:56:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1674728#M592939</guid>
      <dc:creator>DavidM</dc:creator>
      <dc:date>2020-02-12T09:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: If and or statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1675124#M592940</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;After I applied above logic I am getting output as follows(as given in below image)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 361px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/28362iF7C3BDFC2D69E726/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In above image Why i am getting three values ?&lt;/P&gt;&lt;P&gt;I should get only two values as output ie excluded and required part (as stated in below image)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 959px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/28363i6D378818BF4BD8C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Plesae help&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 04:26:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1675124#M592940</guid>
      <dc:creator>sakshikaul</dc:creator>
      <dc:date>2020-02-13T04:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: If and or statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1680627#M592941</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp; Please help&lt;/P&gt;</description>
      <pubDate>Sat, 29 Feb 2020 12:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1680627#M592941</guid>
      <dc:creator>sakshikaul</dc:creator>
      <dc:date>2020-02-29T12:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: If and or statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1680636#M592942</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;instead of below condition&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ck.JPG" style="width: 728px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/29370i3A0E2B0659DC68BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="ck.JPG" alt="ck.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Use&amp;nbsp;&lt;/P&gt;&lt;P&gt;If( Match(&amp;nbsp;&lt;SPAN&gt;ApplyMap( 'Claim_Type' , Claim type [PAR]) ,'EXCLUDED'&amp;nbsp;&lt;/SPAN&gt;), 'Excluded' )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Feb 2020 17:53:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1680636#M592942</guid>
      <dc:creator>NitinK7</dc:creator>
      <dc:date>2020-02-29T17:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: If and or statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1680915#M592943</link>
      <description>&lt;P&gt;Would you be able to provide the Excel behind this and provide the output that you expect to see from the sample provided?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 13:26:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1680915#M592943</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-03-02T13:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: If and or statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1681973#M592944</link>
      <description>&lt;P&gt;Dear Sunny&lt;/P&gt;&lt;P&gt;I was able to handle all the above conditions in Qlikview&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sakshi Kaul&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 09:38:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-or-statement/m-p/1681973#M592944</guid>
      <dc:creator>sakshikaul</dc:creator>
      <dc:date>2020-03-05T09:38:34Z</dc:date>
    </item>
  </channel>
</rss>

