<?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: Select case in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968346#M468442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh sorry about that, I will resend it again,&lt;/P&gt;&lt;P&gt;Tell me, If want to put a sum on that nested if statement, how do i go about it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2015 19:24:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-03T19:24:38Z</dc:date>
    <item>
      <title>Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968340#M468436</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;I'm trying to convert this case code to Qlikview, could I please get assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE&lt;/P&gt;&lt;P&gt;&amp;nbsp; when MAC_CODE = 963 then ''SNL''&lt;/P&gt;&lt;P&gt;&amp;nbsp; Else ''MLOAN''&lt;/P&gt;&lt;P&gt;END as PRODUCT_CODE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE when REGISTRATION_MONTH_CODE = ''NOTREG''&lt;/P&gt;&lt;P&gt;&amp;nbsp; then ''N''&lt;/P&gt;&lt;P&gt;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp; CASE when ( year(INFORMATION_DATE)*100 + month(INFORMATION_DATE) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else ''N''&lt;/P&gt;&lt;P&gt;&amp;nbsp; END as&amp;nbsp; REG_LAST_3MONTHS_IND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE when FINAL_ML_AMT &amp;lt;= 50000&amp;nbsp;&amp;nbsp; then&amp;nbsp; ''A''&lt;/P&gt;&lt;P&gt;&amp;nbsp; when FINAL_ML_AMT &amp;lt;= 100000&amp;nbsp; then&amp;nbsp; ''B''&lt;/P&gt;&lt;P&gt;&amp;nbsp; when FINAL_ML_AMT &amp;lt;= 150000&amp;nbsp; then&amp;nbsp; ''C''&lt;/P&gt;&lt;P&gt;&amp;nbsp; when FINAL_ML_AMT &amp;lt;= 350000&amp;nbsp; then&amp;nbsp; ''D''&lt;/P&gt;&lt;P&gt;&amp;nbsp; when FINAL_ML_AMT &amp;lt;= 700000&amp;nbsp; then&amp;nbsp; ''E''&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else ''F''&lt;/P&gt;&lt;P&gt;END as MLOANS_BANDS_CODE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 13:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968340#M468436</guid>
      <dc:creator />
      <dc:date>2015-09-03T13:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968341#M468437</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;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(MAC_CODE = 963, 'SNL', 'MLOAN') As PRODUCT_CODE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FINAL_ML_AMT &amp;lt;= 50000, 'A',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FINAL_ML_AMT &amp;lt;= 100000, 'B',&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FINAL_ML_AMT &amp;lt;= 150000, 'C',&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FINAL_ML_AMT &amp;lt;= 350000, 'D',&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FINAL_ML_AMT &amp;lt;= 700000, 'E', 'F'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ))))) As &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MLOANS_BANDS_CODE&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can put the rest within an IF statement like the above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 14:02:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968341#M468437</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-09-03T14:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968342#M468438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot, i will try it out now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 18:11:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968342#M468438</guid>
      <dc:creator />
      <dc:date>2015-09-03T18:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968343#M468439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you are missing a condition in the second CASE scenario:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/97925_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 18:14:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968343#M468439</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-09-03T18:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968344#M468440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made a mistake, heres the original code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE &lt;/P&gt;&lt;P&gt;&amp;nbsp; when MAC_CODE = 963 then ''SNL''&lt;/P&gt;&lt;P&gt;&amp;nbsp; Else ''MLOAN'' &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;END as PRODUCT_CODE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;CASE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; when REGISTRATION_MONTH_CODE = ''NOTREG'' then ''N''&lt;/P&gt;&lt;P&gt;&amp;nbsp; else &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CASE &lt;/P&gt;&lt;P&gt;&amp;nbsp; when (year(INFORMATION_DATE)*100 + month(INFORMATION_DATE))&lt;/P&gt;&lt;P&gt;&amp;nbsp; else ''N'' &lt;/P&gt;&lt;P&gt;&amp;nbsp; end &lt;/P&gt;&lt;P&gt;END as&amp;nbsp; REG_LAST_3MONTHS_IND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CASE &lt;/P&gt;&lt;P&gt;&amp;nbsp; when FINAL_ML_AMT &amp;lt;= 50000 then&amp;nbsp; ''A''&lt;/P&gt;&lt;P&gt;&amp;nbsp; when FINAL_ML_AMT &amp;lt;= 100000 then&amp;nbsp; ''B''&lt;/P&gt;&lt;P&gt;&amp;nbsp; when FINAL_ML_AMT &amp;lt;= 150000&amp;nbsp; then&amp;nbsp; ''C''&lt;/P&gt;&lt;P&gt;&amp;nbsp; when FINAL_ML_AMT &amp;lt;= 350000&amp;nbsp; then&amp;nbsp; ''D''&lt;/P&gt;&lt;P&gt;&amp;nbsp; when FINAL_ML_AMT &amp;lt;= 700000&amp;nbsp; then&amp;nbsp; ''E''&lt;/P&gt;&lt;P&gt;&amp;nbsp; else ''F'' &lt;/P&gt;&lt;P&gt;END as MLOANS_BANDS_CODE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 18:26:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968344#M468440</guid>
      <dc:creator />
      <dc:date>2015-09-03T18:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968345#M468441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are missing a "then" after the case statement:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/97926_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 18:33:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968345#M468441</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-09-03T18:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968346#M468442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh sorry about that, I will resend it again,&lt;/P&gt;&lt;P&gt;Tell me, If want to put a sum on that nested if statement, how do i go about it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 19:24:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968346#M468442</guid>
      <dc:creator />
      <dc:date>2015-09-03T19:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968347#M468443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can sum two columns like the below:&lt;/P&gt;&lt;P&gt;If(Column1 + Column2 &amp;lt;= 10000, 'True', 'False')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you use the aggregate version of it, Sum():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Sum(Column1) &amp;lt;= 1000, 'True', 'False')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you need to use Group By in the load script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 19:30:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968347#M468443</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-09-03T19:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968348#M468444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Set analysis cant replace the nested if?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 19:38:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968348#M468444</guid>
      <dc:creator />
      <dc:date>2015-09-03T19:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968349#M468445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on where you want to accomplish this, in the front-end or in the back-end (load script)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 20:01:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968349#M468445</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-09-03T20:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968350#M468446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you perhaps demonstrate how I would execute this on both scenarios please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 20:10:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968350#M468446</guid>
      <dc:creator />
      <dc:date>2015-09-03T20:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968351#M468447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the front-end since you have case else, then you can put the IF statement within your function or by using set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MAC_CODE = 963, Amount)) or Sum({&amp;lt;MAC_CODE = {963}&amp;gt;} Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 20:25:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968351#M468447</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-09-03T20:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Select case</title>
      <link>https://community.qlik.com/t5/QlikView/Select-case/m-p/968352#M468448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is the chart I'm trying to produce:&lt;/P&gt;&lt;P&gt;Rand Value is the sum of that the nested if&lt;/P&gt;&lt;P&gt;Number is the count of the nested if&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Final.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/97935_Final.jpg" style="height: 80px; width: 620px;" /&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 900px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl73" height="17" width="26"&gt;&lt;/TD&gt;&lt;TD class="xl74" width="107"&gt;&lt;/TD&gt;&lt;TD class="xl74" style="border-left: none;" width="112"&gt;&lt;/TD&gt;&lt;TD class="xl74" style="border-left: none;" width="97"&gt;&lt;/TD&gt;&lt;TD class="xl74" style="border-left: none;" width="112"&gt;&lt;/TD&gt;&lt;TD class="xl74" style="border-left: none;" width="108"&gt;&lt;/TD&gt;&lt;TD class="xl74" style="border-left: none;" width="95"&gt;&lt;/TD&gt;&lt;TD class="xl75" style="border-left: none;" width="143"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 20:44:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Select-case/m-p/968352#M468448</guid>
      <dc:creator />
      <dc:date>2015-09-03T20:44:44Z</dc:date>
    </item>
  </channel>
</rss>

