<?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: Conditional calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-calculation/m-p/975381#M643617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your prompt response.&lt;/P&gt;&lt;P&gt;It works perfectly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joao Pereira&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Dec 2015 00:07:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-12-24T00:07:52Z</dc:date>
    <item>
      <title>Conditional calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-calculation/m-p/975379#M643615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm just beginning my work in qlik sense and I've been trying to solve a problem but I didn´t succeed so far.&lt;/P&gt;&lt;P&gt;I have a table&amp;nbsp; from a Call center with call dates and blanks (see below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="99" style="border: 1px solid rgb(0, 0, 0); width: 211px; height: 56px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Call pick up &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;10/2/15 19:41&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;31/3/15 15:26&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5/10/14 9:25&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The dates of calls&amp;nbsp; refer to years 2014 and 2015.&lt;/P&gt;&lt;P&gt;With the function&amp;nbsp; &lt;STRONG&gt;count(year(call pick up ))&lt;/STRONG&gt; the output is the total number of calls during 2014 and 2015 and is ok.&lt;/P&gt;&lt;P&gt;The problem is when I want to calculate the number of calls separately by year.&lt;/P&gt;&lt;P&gt;As the year is implicit in the data I tried something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(year(call pick up)=2015,count(call pick up)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;or instead&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;count({$&amp;lt;year(call pick up)={$("2015"}&amp;gt;} year (call pick up))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody help?&lt;/P&gt;&lt;P&gt;Thks in advance&lt;/P&gt;&lt;P&gt;Joao Pereira&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 01:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-calculation/m-p/975379#M643615</guid>
      <dc:creator />
      <dc:date>2015-12-23T01:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-calculation/m-p/975380#M643616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Count(&lt;SPAN style="color: #ff0000;"&gt;I&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;f(Year(call pick up) = 2015,&lt;/SPAN&gt; [C&lt;/STRONG&gt;&lt;/SPAN&gt;all pick up]&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Basically add the if statement within the Count() function&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 16:53:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-calculation/m-p/975380#M643616</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-23T16:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-calculation/m-p/975381#M643617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your prompt response.&lt;/P&gt;&lt;P&gt;It works perfectly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joao Pereira&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2015 00:07:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-calculation/m-p/975381#M643617</guid>
      <dc:creator />
      <dc:date>2015-12-24T00:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-calculation/m-p/975382#M643618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just as an suggestion for improvement, you can create Year in script like this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [call pick up],&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; Year([call pick up] as Year&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;and can then use set analysis instead of if statement. Set analysis is much more efficient than if statements&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;Year = {2015}&amp;gt;}[call pick up])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Dec 2015 11:32:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-calculation/m-p/975382#M643618</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-24T11:32:09Z</dc:date>
    </item>
  </channel>
</rss>

