<?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: Case Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922008#M987990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheers guys! I will just keep it in the SQL then I think.. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jul 2015 12:26:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-07-30T12:26:27Z</dc:date>
    <item>
      <title>Case Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922004#M987986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a case statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case&lt;/P&gt;&lt;P&gt;&amp;nbsp; when (territory = 'EXP FR' or territory like 'FRA%') then 'France'&lt;/P&gt;&lt;P&gt;&amp;nbsp; when territory = 'EXP IR' then 'Ireland'&lt;/P&gt;&lt;P&gt;&amp;nbsp; when territory in ('NIR WH','NWA WH','SCO WH','NOR WE','SWE WH','NOR EA','EMD WH','MAN WE','MAN EA','MID WH',&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'SEA SO','SEA WH','SWA WH','EAN WH','SCO WH') then 'UK' &lt;/P&gt;&lt;P&gt;&amp;nbsp; when territory = 'EXP WH' then 'ROW'&lt;/P&gt;&lt;P&gt;&amp;nbsp; when territory = 'EXP BE' then 'Belgium'&lt;/P&gt;&lt;P&gt;&amp;nbsp; when territory = 'EXP GE' then 'Germany'&lt;/P&gt;&lt;P&gt;&amp;nbsp; when territory = 'EXP CH' then 'Channel Islands' end as customer_country&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know this is a mixture of wildmatch and match, so is it possible to put this into a load script or is this best kept in a SQL statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 11:48:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922004#M987986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-30T11:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Case Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922005#M987987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Case statement is not possible in LOAD script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use ifs and Match function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a little example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(territory = 'EXP FR','France',&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(territory = 'EXP IR', 'Ireland',&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(Match(territory,'NIR WH','NWA WH','SCO WH','NOR WE','SWE WH','NOR EA','EMD WH','MAN WE','MAN EA','MID WH','SEA SO','SEA WH','SWA WH','EAN WH','SCO WH')&amp;gt;0,'UK','ROW'))) AS territory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; territory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXP FR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXP IR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NIR WH&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 11:51:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922005#M987987</guid>
      <dc:creator>sorrakis01</dc:creator>
      <dc:date>2015-07-30T11:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Case Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922006#M987988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try with nested if -else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 11:53:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922006#M987988</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-07-30T11:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Case Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922007#M987989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;Perform the case statement in an SQL View and bring that across.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;Or as you suggest use Pick and Wildmatch in the load.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;Pick(WildMatch(territory, 'EXP FR', 'EXP IR', '*'), &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'France'&lt;/SPAN&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Ireland'&lt;/SPAN&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Other') AS&amp;nbsp; customer_country&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN lang="en" style="font-family: inherit; font-style: inherit; font-weight: inherit;"&gt;Compare times to load the view verse doing it in script and take the quicker option.&amp;nbsp; Both will work.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 12:22:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922007#M987989</guid>
      <dc:creator>ogster1974</dc:creator>
      <dc:date>2015-07-30T12:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Case Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922008#M987990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheers guys! I will just keep it in the SQL then I think.. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 12:26:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-Statement/m-p/922008#M987990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-07-30T12:26:27Z</dc:date>
    </item>
  </channel>
</rss>

