<?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 Apply Maps/ IF Statements in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Apply-Maps-IF-Statements/m-p/1949619#M1219689</link>
    <description>&lt;P&gt;I am pretty new to Qlik I am attempting to use Apply Maps and an IF Statement for the following issue:&lt;/P&gt;
&lt;P&gt;I have 3 tables of data&lt;/P&gt;
&lt;P&gt;(Fact) Table - Table A - churnID, Client ID, Indicator&lt;/P&gt;
&lt;P&gt;(Lookup) Table B -churnID, Description ID, Description&lt;/P&gt;
&lt;P&gt;Table C - Description ID, Description&lt;/P&gt;
&lt;P&gt;Only Table A &amp;amp; B have the same churn ID(field) so the lookup is easy, however in table A there is an 'Indicator' field IF a '2' then I should lookup and return the Description field in Table C, IF the indicator is NULL then by default it should return the description in Table B?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jun 2022 10:24:36 GMT</pubDate>
    <dc:creator>LB187</dc:creator>
    <dc:date>2022-06-29T10:24:36Z</dc:date>
    <item>
      <title>Apply Maps/ IF Statements</title>
      <link>https://community.qlik.com/t5/QlikView/Apply-Maps-IF-Statements/m-p/1949619#M1219689</link>
      <description>&lt;P&gt;I am pretty new to Qlik I am attempting to use Apply Maps and an IF Statement for the following issue:&lt;/P&gt;
&lt;P&gt;I have 3 tables of data&lt;/P&gt;
&lt;P&gt;(Fact) Table - Table A - churnID, Client ID, Indicator&lt;/P&gt;
&lt;P&gt;(Lookup) Table B -churnID, Description ID, Description&lt;/P&gt;
&lt;P&gt;Table C - Description ID, Description&lt;/P&gt;
&lt;P&gt;Only Table A &amp;amp; B have the same churn ID(field) so the lookup is easy, however in table A there is an 'Indicator' field IF a '2' then I should lookup and return the Description field in Table C, IF the indicator is NULL then by default it should return the description in Table B?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 10:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Apply-Maps-IF-Statements/m-p/1949619#M1219689</guid>
      <dc:creator>LB187</dc:creator>
      <dc:date>2022-06-29T10:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Apply Maps/ IF Statements</title>
      <link>https://community.qlik.com/t5/QlikView/Apply-Maps-IF-Statements/m-p/1952121#M1219777</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/186539"&gt;@LB187&lt;/a&gt;&amp;nbsp; Could you please provide Samples from all the 3 tables and also the expected output so that we could you help you to resolve this issue.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 05:31:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Apply-Maps-IF-Statements/m-p/1952121#M1219777</guid>
      <dc:creator>sidhiq91</dc:creator>
      <dc:date>2022-07-06T05:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Apply Maps/ IF Statements</title>
      <link>https://community.qlik.com/t5/QlikView/Apply-Maps-IF-Statements/m-p/1952154#M1219779</link>
      <description>&lt;P&gt;You need multiple and partly nested mappings, maybe something like this:&lt;/P&gt;
&lt;P&gt;MapDescriptionB:&lt;BR /&gt;mapping load [&lt;SPAN&gt;Description ID], Description from B;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;MapDescriptionC:&lt;BR /&gt;mapping load [&lt;SPAN&gt;Description ID], Description from C;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;MapDescriptionID:&lt;BR /&gt;mapping load churnID, [Description ID] from B;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Final:&lt;BR /&gt;load *, &lt;BR /&gt;&amp;nbsp; &amp;nbsp;if(Indicator = 'a', &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;applymap('MapDescriptionC', applymap('MapDescriptionID', churnID, null()), 'no match C'),&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;applymap('MapDescriptionB',&amp;nbsp;[Description ID], 'no match B')) as Description&lt;BR /&gt;from A;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 06:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Apply-Maps-IF-Statements/m-p/1952154#M1219779</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-07-06T06:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Apply Maps/ IF Statements</title>
      <link>https://community.qlik.com/t5/QlikView/Apply-Maps-IF-Statements/m-p/1952160#M1219780</link>
      <description>&lt;P&gt;Try this way , bit lengthy but will do the job for you&lt;/P&gt;
&lt;P&gt;T3:&lt;BR /&gt;MAPPING Load * inline [&lt;BR /&gt;DescriptionID, Description&lt;BR /&gt;A1,AAA&lt;BR /&gt;A2,BBB&lt;BR /&gt;A3,CCC&lt;BR /&gt;A4,DDD&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;T2:&lt;BR /&gt;LOAD *,&lt;BR /&gt;ApplyMap('T3',[DescriptionID]) AS Description_C;&lt;BR /&gt;Load * inline [&lt;BR /&gt;churnID, DescriptionID, Description&lt;BR /&gt;1,A1,AAA&lt;BR /&gt;2,A2,BBB&lt;BR /&gt;3,A3,ABCE&lt;BR /&gt;4,A4,FFF&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;T1:&lt;BR /&gt;Load *,&lt;BR /&gt;If(len(Indicator) &amp;lt;&amp;gt; '0',&lt;BR /&gt;Lookup('Description_C',[churnID],[churnID],'T2'),&lt;BR /&gt;Lookup('Description',[churnID],[churnID],'T2')) as Description;&lt;BR /&gt;Load * inline [&lt;BR /&gt;churnID, Client ID, Indicator&lt;BR /&gt;1,1,1&lt;BR /&gt;2,2,2&lt;BR /&gt;3,3,&lt;BR /&gt;4,4,4&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;drop table T2;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 07:19:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Apply-Maps-IF-Statements/m-p/1952160#M1219780</guid>
      <dc:creator>GnaneswarReddy</dc:creator>
      <dc:date>2022-07-06T07:19:04Z</dc:date>
    </item>
  </channel>
</rss>

