<?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, Mapping Load or other method to handle this use case in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974018#M333069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mapping_Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mapping&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Field1, Field2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, Test1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, Test1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C, Test2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;D, Test2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fact:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Field XYZ],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('Mapping_Table', [Field XYZ]) as [Grouped Field]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM Source;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Fact:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LOAD [Field XYZ],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match([Field XYZ], 'A', 'B'), 'Test1', 'Test2') as [Grouped Field]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;FROM Source;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Nov 2015 21:55:43 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-11-10T21:55:43Z</dc:date>
    <item>
      <title>If Statement, Mapping Load or other method to handle this use case</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974017#M333068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have Field XYZ with Values A, B, C, D. This field is used as a key List Box on an existing app. &lt;/P&gt;&lt;P&gt;I need to keep this field and add a new field that groups these values. So:&lt;/P&gt;&lt;P&gt;Field TUV with Values A, B AS Test1 and &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Values C, D as Test2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;** so if I select Test1, then values from A and B will return and if I select Test2, values from C and D will return&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to do this, either by leveraging an 'If' statement or mapping load or another method.&lt;/P&gt;&lt;P&gt;I would greatly appreciate exact syntax leveraging my mock example. Thanks all!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 21:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974017#M333068</guid>
      <dc:creator />
      <dc:date>2015-11-10T21:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement, Mapping Load or other method to handle this use case</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974018#M333069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mapping_Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mapping&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Field1, Field2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, Test1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, Test1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C, Test2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;D, Test2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fact:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Field XYZ],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('Mapping_Table', [Field XYZ]) as [Grouped Field]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM Source;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Fact:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LOAD [Field XYZ],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Match([Field XYZ], 'A', 'B'), 'Test1', 'Test2') as [Grouped Field]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;FROM Source;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 21:55:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974018#M333069</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-10T21:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement, Mapping Load or other method to handle this use case</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974019#M333070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you only have few values (4 in your question, A B C D) you can use an if or a pick(match(...)...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pick(match(XYZ, 'A', 'B', 'C', 'D'), 'Test1', 'Test1', 'Test2', 'Test2') as TUV;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; XYZ&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2015 21:57:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974019#M333070</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-11-10T21:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement, Mapping Load or other method to handle this use case</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974020#M333071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply. I have tried this method and my script reloads successfully, the new field is added, however, no values are present to select (was hoping for two values: StaffAug and Project. My exact logic is below (minus the logic after this piece to load everything else). Any initial thoughts of what I might have done wrong? note: I am working from an existing, very over engineered script so the root cause could be deeper.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; pick(match([Financial Tracking Level], 'A', 'AB', 'ABFT', 'ABC'),&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'StaffAug', 'StaffAug', 'Project', 'Project') AS [Project Type];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 15:25:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974020#M333071</guid>
      <dc:creator />
      <dc:date>2015-11-11T15:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement, Mapping Load or other method to handle this use case</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974021#M333072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Script looks fine to me. I think it might be another issue like you said.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 16:37:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974021#M333072</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-11T16:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement, Mapping Load or other method to handle this use case</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974022#M333073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;with your data&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/105194_1.png" style="height: auto; width: auto;" /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Load *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; pick(match([Financial Tracking Level], 'A', 'AB', 'ABFT', 'ABC'),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; 'StaffAug', 'StaffAug', 'Project', 'Project') AS [Project Type];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Load * inline [ &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Financial Tracking Level&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AB&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ABFT&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ABC&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ZZZ1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ZZZ2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 16:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974022#M333073</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-11-11T16:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: If Statement, Mapping Load or other method to handle this use case</title>
      <link>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974023#M333074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi - I just wanted to let you know that the original syntax you provided did end up working -- I will store this for future reference! My values were actually 1. A, 2. AB, 3. ABFT, 4. ABC, so I just needed to adjust those values in the script. Thanks again for your help. I am working a large project so I might have additional questions if I get stuck, but thanks so much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 20:06:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Statement-Mapping-Load-or-other-method-to-handle-this-use/m-p/974023#M333074</guid>
      <dc:creator />
      <dc:date>2015-11-11T20:06:19Z</dc:date>
    </item>
  </channel>
</rss>

