<?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 Help with IF statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-IF-statement/m-p/448227#M488983</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 need a bit of help with creating an IF Statement.&amp;nbsp; I have a calculated expression which is below, which works out the hours between the time my call was closed to when it was logged.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Interval(&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; (RangeMin(frac(closedate_true), MakeTime(18)) &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; - RangeMax(frac(logdate_true), MakeTime(8)))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; + (NetWorkDays(logdate_true, closedate_true-1) * MakeTime(10)) // Only 10 hours per whole day&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the things the below script does, it doesnt calculate any time between before 08:00 and after 18:00.&amp;nbsp; However I have noticed that if a call is logged and closed before the calulcation sets in, it then sets the sum as a minus figure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been advised to create and IF Statement to ignore any calculation where the call was not logged and closed between 08:00 - 18:00, however I have no idea how to start my IF Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would someone be able to assist me with this please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jon Ditchfield&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2012 14:49:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-18T14:49:10Z</dc:date>
    <item>
      <title>Help with IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-IF-statement/m-p/448227#M488983</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 need a bit of help with creating an IF Statement.&amp;nbsp; I have a calculated expression which is below, which works out the hours between the time my call was closed to when it was logged.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Interval(&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; (RangeMin(frac(closedate_true), MakeTime(18)) &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; - RangeMax(frac(logdate_true), MakeTime(8)))&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; + (NetWorkDays(logdate_true, closedate_true-1) * MakeTime(10)) // Only 10 hours per whole day&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the things the below script does, it doesnt calculate any time between before 08:00 and after 18:00.&amp;nbsp; However I have noticed that if a call is logged and closed before the calulcation sets in, it then sets the sum as a minus figure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been advised to create and IF Statement to ignore any calculation where the call was not logged and closed between 08:00 - 18:00, however I have no idea how to start my IF Statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would someone be able to assist me with this please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jon Ditchfield&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 14:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-IF-statement/m-p/448227#M488983</guid>
      <dc:creator />
      <dc:date>2012-12-18T14:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help with IF statement</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-IF-statement/m-p/448228#M488984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you want to discard those records with values i.e.: 23:00 or 06:58 (before 8 and after 20). If so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13558425793521484" jivemacro_uid="_13558425793521484"&gt;&lt;P&gt;=If(Frac(closedate_true) &amp;gt; MakeTime(18) OR Frac(logdate_true) &amp;lt; MakeTime(8),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interval(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RangeMin(frac(closedate_true), MakeTime(18)) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - RangeMax(frac(logdate_true), MakeTime(8)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (NetWorkDays(logdate_true, closedate_true-1) * MakeTime(10)) // Only 10 hours per whole day&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;, 'Discarded'&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 14:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-IF-statement/m-p/448228#M488984</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-12-18T14:59:24Z</dc:date>
    </item>
  </channel>
</rss>

