<?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 Condition on 4 Columns in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512622#M600062</link>
    <description>&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;Please help me write a if condition for below scenario.&lt;/P&gt;&lt;P&gt;Attached the Data file.&lt;/P&gt;&lt;P&gt;Currenty i have tried this way..but its not coming correct:&lt;/P&gt;&lt;P&gt;If(ScopingComplete='Yes' or GovernanceComplete ='Yes' and ScopingStartDate= Null(),'Gray',&lt;BR /&gt;If(ScopingComplete='No' or GovernanceComplete ='No' and ScopingStartDate= Null(),'Blue',&lt;BR /&gt;If(ScopingComplete='No' or GovernanceComplete ='Yes' and NetWorkDays(ScopingStartDate, Today())&amp;gt;=0 and NetWorkDays(ScopingStartDate, Today()) &amp;lt;=10,'Green',&lt;BR /&gt;If(ScopingComplete='Yes' or GovernanceComplete ='No' and NetWorkDays(ScopingStartDate, Today())&amp;gt;10 and NetWorkDays(ScopingStartDate, Today())&amp;lt;=25,'Orange', 'Red')))) as NEW,&lt;/P&gt;&lt;P&gt;What i am getting is only two values in below table&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="RESULT" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1049i6D7CA1617A07CF41/image-size/large?v=v2&amp;amp;px=999" role="button" title="Result.PNG" alt="RESULT" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;RESULT&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please help me on this regards.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Nov 2018 07:15:16 GMT</pubDate>
    <dc:creator>kishoreravi1983</dc:creator>
    <dc:date>2018-11-27T07:15:16Z</dc:date>
    <item>
      <title>If Condition on 4 Columns</title>
      <link>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512622#M600062</link>
      <description>&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;Please help me write a if condition for below scenario.&lt;/P&gt;&lt;P&gt;Attached the Data file.&lt;/P&gt;&lt;P&gt;Currenty i have tried this way..but its not coming correct:&lt;/P&gt;&lt;P&gt;If(ScopingComplete='Yes' or GovernanceComplete ='Yes' and ScopingStartDate= Null(),'Gray',&lt;BR /&gt;If(ScopingComplete='No' or GovernanceComplete ='No' and ScopingStartDate= Null(),'Blue',&lt;BR /&gt;If(ScopingComplete='No' or GovernanceComplete ='Yes' and NetWorkDays(ScopingStartDate, Today())&amp;gt;=0 and NetWorkDays(ScopingStartDate, Today()) &amp;lt;=10,'Green',&lt;BR /&gt;If(ScopingComplete='Yes' or GovernanceComplete ='No' and NetWorkDays(ScopingStartDate, Today())&amp;gt;10 and NetWorkDays(ScopingStartDate, Today())&amp;lt;=25,'Orange', 'Red')))) as NEW,&lt;/P&gt;&lt;P&gt;What i am getting is only two values in below table&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="RESULT" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/1049i6D7CA1617A07CF41/image-size/large?v=v2&amp;amp;px=999" role="button" title="Result.PNG" alt="RESULT" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;RESULT&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Please help me on this regards.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 07:15:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512622#M600062</guid>
      <dc:creator>kishoreravi1983</dc:creator>
      <dc:date>2018-11-27T07:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition on 4 Columns</title>
      <link>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512651#M600063</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;you only get the two first values because you have the for option covered in the first two statements&amp;nbsp;&lt;/P&gt;&lt;P&gt;i assume you wanted to group the or statement and than check the and statement&amp;nbsp;&lt;/P&gt;&lt;P&gt;so you need to warp the or statement in brackets like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;f((ScopingComplete='Yes' or GovernanceComplete ='Yes' )and ScopingStartDate= Null(),'Gray',&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 08:00:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512651#M600063</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2018-11-27T08:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition on 4 Columns</title>
      <link>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512652#M600064</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;you only get the two first values because you have the for option covered in the first two statements&amp;nbsp;&lt;/P&gt;&lt;P&gt;i assume you wanted to group the or statement and than check the and statement&amp;nbsp;&lt;/P&gt;&lt;P&gt;so you need to warp the or statement in brackets like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if((ScopingComplete='Yes' or GovernanceComplete ='Yes' )and ScopingStartDate= Null(),'Gray'&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 08:01:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512652#M600064</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2018-11-27T08:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition on 4 Columns</title>
      <link>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512666#M600065</link>
      <description>&lt;P&gt;You can try below syntax.&amp;nbsp; This might help.&lt;/P&gt;&lt;P&gt;If(ScopingComplete='Yes' and GovernanceComplete ='Yes' and IsNull(ScopingStartDate),'Gray',&lt;BR /&gt;If(ScopingComplete='No' and GovernanceComplete ='No' and IsNull(ScopingStartDate),'Orange',&lt;BR /&gt;If(ScopingComplete='Yes' and GovernanceComplete ='No' and IsNull(ScopingStartDate),'Blue',&lt;BR /&gt;If(ScopingComplete='No' and GovernanceComplete ='Yes' and IsNull(ScopingStartDate),'Blue',&lt;BR /&gt;if(NetWorkDays(ScopingStartDate,Today())&amp;lt;=10,'Green',&lt;BR /&gt;&amp;nbsp; &amp;nbsp;if(NetWorkDays(ScopingStartDate,Today())&amp;gt;10 and Days&amp;lt;=25,'Orange',&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if(NetWorkDays(ScopingStartDate,Today())&amp;gt;25,'Red'))))))) as New&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 08:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512666#M600065</guid>
      <dc:creator>ashok_rajm</dc:creator>
      <dc:date>2018-11-27T08:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition on 4 Columns</title>
      <link>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512689#M600066</link>
      <description>Hi Ashok,&lt;BR /&gt;with a Bit change in the code the solution is working fine now. Thanks a lot for quick reply&lt;BR /&gt;If(ScopingComplete='Yes' and GovernanceComplete ='Yes' ,'Gray',&lt;BR /&gt;If(ScopingComplete='Yes' and GovernanceComplete ='No' and IsNull(ScopingStartDate),'Blue',&lt;BR /&gt;If(ScopingComplete='No' and GovernanceComplete ='Yes' and IsNull(ScopingStartDate),'Blue',&lt;BR /&gt;If(ScopingComplete='No' and GovernanceComplete ='No' and IsNull(ScopingStartDate),'Blue',&lt;BR /&gt;If(NetWorkDays(ScopingStartDate, Today())&amp;gt;=0 and NetWorkDays(ScopingStartDate, Today()) &amp;lt;=10,'Green',&lt;BR /&gt;If(NetWorkDays(ScopingStartDate,Today())&amp;gt;10 and NetWorkDays(ScopingStartDate, Today())&amp;lt;=25,'Orange',&lt;BR /&gt;If(NetWorkDays(ScopingStartDate,Today())&amp;gt;25,'Red'))))))) as NEW,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Nov 2018 08:46:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512689#M600066</guid>
      <dc:creator>kishoreravi1983</dc:creator>
      <dc:date>2018-11-27T08:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition on 4 Columns</title>
      <link>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512765#M600067</link>
      <description>&lt;P&gt;&lt;A href="http://www.qlikblog.at/1384/set-analysis-wizard-qlikview/" target="_blank"&gt;http://www.qlikblog.at/1384/set-analysis-wizard-qlikview/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 10:51:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512765#M600067</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2018-11-27T10:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: If Condition on 4 Columns</title>
      <link>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512806#M600068</link>
      <description>&lt;P&gt;the reason why its faling is because you are using OR&lt;/P&gt;&lt;P&gt;example 1&lt;/P&gt;&lt;P&gt;0 or 1 then 1-&amp;gt;true&lt;/P&gt;&lt;P&gt;1 or 0 then 1 -&amp;gt;true&lt;/P&gt;&lt;P&gt;always your condition will be true&lt;/P&gt;&lt;P&gt;so if you use and&lt;/P&gt;&lt;P&gt;then it will be good&lt;/P&gt;&lt;P&gt;example 2:&lt;/P&gt;&lt;P&gt;0 and 1 only if condition true it will be true or else it will be false&lt;/P&gt;&lt;P&gt;1 and 0&amp;nbsp;&lt;SPAN&gt;only if condition true it will be true or else it will be false&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Mano&lt;/SPAN&gt;&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>Tue, 27 Nov 2018 11:57:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Condition-on-4-Columns/m-p/1512806#M600068</guid>
      <dc:creator>manoranjan_321988</dc:creator>
      <dc:date>2018-11-27T11:57:42Z</dc:date>
    </item>
  </channel>
</rss>

