<?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 then else expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792089#M1041534</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;use set analysis Write two expression&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;count({&amp;lt;country={"Singapore"}&amp;gt;}case type)&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;count({&amp;lt;country={"Malaysia"}&amp;gt;}case type)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if you want if else&lt;/P&gt;&lt;P&gt;then try like&lt;/P&gt;&lt;P&gt;count(if(country='Singapore',case type,if(country='Malaysia',case type)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Dec 2014 05:32:02 GMT</pubDate>
    <dc:creator>PrashantSangle</dc:creator>
    <dc:date>2014-12-08T05:32:02Z</dc:date>
    <item>
      <title>If then else expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792086#M1041531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a column, case type and two countries, Singapore and Malaysia. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do a bar chart and have a count of case type for Singapore and Malaysia side by side. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dimension is by months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to use the if then else expression but I have no idea how to word it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do if country = singapore, then count (case type) if not, then do not count. How do I do that? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 05:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792086#M1041531</guid>
      <dc:creator />
      <dc:date>2014-12-08T05:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792087#M1041532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;Count({&amp;lt;Country={'Singapore'}&amp;gt;} [Case Type])&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; // Set analysis; performance wise better&lt;/P&gt;&lt;P&gt;Or,&lt;/P&gt;&lt;P&gt;Count(If(Country='Singapore', [Case Type]) )&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If ..then ..else&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 05:29:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792087#M1041532</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-12-08T05:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792088#M1041533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below Expression provide you the count of CaseType where country=Singapore. Else it will not calculate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;Country={'Singapore'}&amp;gt;} CaseType)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 05:30:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792088#M1041533</guid>
      <dc:creator>ashwanin</dc:creator>
      <dc:date>2014-12-08T05:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792089#M1041534</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;use set analysis Write two expression&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;count({&amp;lt;country={"Singapore"}&amp;gt;}case type)&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;count({&amp;lt;country={"Malaysia"}&amp;gt;}case type)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if you want if else&lt;/P&gt;&lt;P&gt;then try like&lt;/P&gt;&lt;P&gt;count(if(country='Singapore',case type,if(country='Malaysia',case type)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 05:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792089#M1041534</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-12-08T05:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: If then else expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792090#M1041535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Tresesco&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how may I do the following expression in my chart? &lt;/P&gt;&lt;P&gt;- what I'm trying to do is - return only the results which are greater than or less than 3000 for example. for that i used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(Sum({&amp;lt;Year=,Month]=, Date={'&amp;gt;=$(vYTDStart)&amp;lt;=$(vYTDEnd)'}&amp;gt;}Amount) &amp;gt;=3000 ,&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Year=,Month=, Date={'&amp;gt;=$(vYTDStart)&amp;lt;=$(vYTDEnd)'}&amp;gt;}Amount),'0')&amp;nbsp;&amp;nbsp;&amp;nbsp; // this is returning one end of the result. but then if i go&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;if(Sum({&amp;lt;Year=,Month]=, Date={'&amp;gt;=$(vYTDStart)&amp;lt;=$(vYTDEnd)'}&amp;gt;}Amount) &amp;gt;=3000 ,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Sum({&amp;lt;Year=,Month=, Date={'&amp;gt;=$(vYTDStart)&amp;lt;=$(vYTDEnd)'}&amp;gt;}Amount),'0')&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;or &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;if(Sum({&amp;lt;Year=,Month]=, Date={'&amp;gt;=$(vYTDStart)&amp;lt;=$(vYTDEnd)'}&amp;gt;}Amount) &amp;lt;= - 3000 ,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Sum({&amp;lt;Year=,Month=, Date={'&amp;gt;=$(vYTDStart)&amp;lt;=$(vYTDEnd)'}&amp;gt;}Amount),'0')&amp;nbsp; //this returns 0 or -1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;if you could please point out what I'm doing that's incorrect.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Thanks.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Bon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 02:12:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-else-expression/m-p/792090#M1041535</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-09T02:12:20Z</dc:date>
    </item>
  </channel>
</rss>

