<?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 with Subfield in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement-with-Subfield/m-p/611965#M1120435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicole,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your quick response.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Jasmine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Feb 2014 16:53:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-05T16:53:28Z</dc:date>
    <item>
      <title>If statement with Subfield</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-with-Subfield/m-p/611963#M1120432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hi, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have an aggregated data which I need to separate the data by ":" and indicate them as "Sector", "Region" "Country" and "Business". However, not all data are in the same order. For example, some data have Sector/Region/Country/Business and some data have Sector/Region/Business/Region, Column "KeyInd" indicates the difference. I've constructed following if statement but unable to finish it. Please help. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The logic is &lt;SPAN style="font-size: 10pt;"&gt;If &lt;SPAN style="color: #800000;"&gt;KeyInd&lt;/SPAN&gt; = 'TB061_tblKeys_Business', then the third value after ":" will be Business and if not, and if KeyInd = 'TB029_tblKeys_Countries', then the fourth value after ":" will be Country, if not Business)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;LOAD&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Key_ID, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;SubField&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Key_ID&lt;/SPAN&gt;, ':', 1) &lt;SPAN style="color: #0000ff;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AML_Sector&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;SubField&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Key_ID&lt;/SPAN&gt;, ':', 2) &lt;SPAN style="color: #0000ff;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AML_Region&lt;/SPAN&gt;,&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;KeyInd&lt;/SPAN&gt; = 'TB061_tblKeys_Business', &lt;SPAN style="color: #0000ff;"&gt;SubField&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Key_ID&lt;/SPAN&gt;, ':', 3)&lt;SPAN style="color: #0000ff;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;AML_Business&lt;/SPAN&gt;&lt;SPAN&gt;, AML_Country), &lt;BR /&gt;If(KeyInd = 'TB029_tblKeys_Countries', SubField(Key_ID, ':', 4)As AML_Country, AML_Business),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;KeyInd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;FROM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;QVD\AML_Master.qvd&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;(qvd); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank you!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Jasmine&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 16:25:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-with-Subfield/m-p/611963#M1120432</guid>
      <dc:creator />
      <dc:date>2014-02-05T16:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: If statement with Subfield</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-with-Subfield/m-p/611964#M1120434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOAD Key_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(Key_ID, ':', 1) AS AML_Sector,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(Key_ID, ':', 2) AS AML_Region,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(KeyInd = 'TB061_tblKeys_Business', SubField(Key_ID, ':', 3), SubField(Key_ID, ':', 4)) as AML_Business,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(KeyInd = 'TB029_tblKeys_Countries', SubField(Key_ID, ':', 4), SubField(Key_ID, ':', 3)) as AML_Country,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KeyInd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;C:\Users\jl99043\Desktop\Indicator.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 16:28:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-with-Subfield/m-p/611964#M1120434</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-02-05T16:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: If statement with Subfield</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-with-Subfield/m-p/611965#M1120435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicole,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your quick response.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Jasmine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Feb 2014 16:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-with-Subfield/m-p/611965#M1120435</guid>
      <dc:creator />
      <dc:date>2014-02-05T16:53:28Z</dc:date>
    </item>
  </channel>
</rss>

