<?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 Nested if Statement - 2 fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-if-Statement-2-fields/m-p/550765#M205689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to write a nested if statement.&amp;nbsp; I tried the following but it is not working.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Working Status]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Consultant', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Location]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;like&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;'3PP*','Offshore Consultant')), 'Onshore Consultant',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Working Status]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Consultant Location]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need logic in my script that will do the following.&amp;nbsp; &lt;/P&gt;&lt;P&gt;If [Working Status] = 'Consultant' AND [Location] LIKE '3PP*' then 'Offshore Consultant'&lt;/P&gt;&lt;P&gt;If [Working Status] = 'Consultant' AND [Location] NOT LIKE '3PP*' then 'Onshore Consultant'&lt;/P&gt;&lt;P&gt;else [Working Status].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I want to split my current [Working Status] value of 'Consultant' into 2 values "Onshore" vs "Offshore" using the [Location] field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Aug 2013 20:12:01 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-01T20:12:01Z</dc:date>
    <item>
      <title>Nested if Statement - 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-Statement-2-fields/m-p/550765#M205689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to write a nested if statement.&amp;nbsp; I tried the following but it is not working.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Working Status]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Consultant', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Location]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;like&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;'3PP*','Offshore Consultant')), 'Onshore Consultant',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Working Status]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Consultant Location]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need logic in my script that will do the following.&amp;nbsp; &lt;/P&gt;&lt;P&gt;If [Working Status] = 'Consultant' AND [Location] LIKE '3PP*' then 'Offshore Consultant'&lt;/P&gt;&lt;P&gt;If [Working Status] = 'Consultant' AND [Location] NOT LIKE '3PP*' then 'Onshore Consultant'&lt;/P&gt;&lt;P&gt;else [Working Status].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I want to split my current [Working Status] value of 'Consultant' into 2 values "Onshore" vs "Offshore" using the [Location] field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 20:12:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-Statement-2-fields/m-p/550765#M205689</guid>
      <dc:creator />
      <dc:date>2013-08-01T20:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if Statement - 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-Statement-2-fields/m-p/550766#M205690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If([Working Status] = 'Consultant' AND wildmatch([Location],'3PP*'),'Offshore Consultant',&lt;/P&gt;&lt;P&gt;If([Working Status] = 'Consultant' AND not wildmatch([Location],'3PP*','Onshore Consultant',[Working Status]))&lt;/P&gt;&lt;P&gt;as YourField&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 20:35:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-Statement-2-fields/m-p/550766#M205690</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-01T20:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if Statement - 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-if-Statement-2-fields/m-p/550767#M205691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i was also able to use the following code to get it to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Working Status]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Consultant' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Location]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;like&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; '3PP*', 'Offshore Cons', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Working Status]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='Consultant' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;not&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Location]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;like&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; '3PP*', 'Onshore Cons', &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Working Status]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Working Status (location)]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 13:39:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-if-Statement-2-fields/m-p/550767#M205691</guid>
      <dc:creator />
      <dc:date>2013-08-02T13:39:17Z</dc:date>
    </item>
  </channel>
</rss>

