<?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: Need help with the Expression if condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-with-the-Expression-if-condition/m-p/1377971#M420481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just add the null condition at the start of your IF condition like the below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max(Aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( isnull(min(BDate))=0 and isnull(min(CDate))=0 ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(InQuarter(min(CDate), Quarter_Start, 0) AND InQuarter(min([BDate]), Quarter_Start, 0), min(CDate) - min([BDate]),&lt;/P&gt;&lt;P&gt; IF (InQuarter(min(CDate), Quarter_Start, 0), min(CDate) - Quarter_Start,&lt;/P&gt;&lt;P&gt; IF (InQuarter(min([BDate]), Quarter_Start, 0), DayStart(Quarter_End) - min([BDate]),&lt;/P&gt;&lt;P&gt; IF (not(InQuarter(min(CDate), Quarter_Start, 0)) and not(InQuarter(min([BDate]), Quarter_Start, 0)) and min(CDate) &amp;gt; Quarter_Start and min([BDate]) &amp;lt; Quarter_End, Quarter_End - Quarter_Start&lt;/P&gt;&lt;P&gt;))))), Year, Order))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Oct 2017 04:33:32 GMT</pubDate>
    <dc:creator>qliksus</dc:creator>
    <dc:date>2017-10-02T04:33:32Z</dc:date>
    <item>
      <title>Need help with the Expression if condition</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-the-Expression-if-condition/m-p/1377970#M420480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I’m trying to calculate the number of Days an Order took from BDate to CDate based on the “Date” field. If the” Date” is blank then need to ignore that Order. The below expression is calculating the days correctly for most cases but when the Order has either only BDate or CDate it’s not calculating it correctly.&amp;nbsp; There should be value for &lt;STRONG style="color: red;"&gt;both BDate and CDate&lt;/STRONG&gt;, if either BDate or CDate is blank then need to ignore that order.&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt; For example in the attached qvw and excel &lt;STRONG&gt;Order PTC&lt;/STRONG&gt; has only CDate, &lt;STRONG style="color: red;"&gt;BDate is blank&lt;/STRONG&gt; so this order should be ignored.&amp;nbsp; I tried to write the following expression but it’s not working. Please can someone help me with the expression?&amp;nbsp; Thanks,&lt;/P&gt;&lt;P style="margin-left: .5in; margin-bottom: .0001pt;"&gt;Ramya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Oct 2017 03:50:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-the-Expression-if-condition/m-p/1377970#M420480</guid>
      <dc:creator>ramyasaiqv</dc:creator>
      <dc:date>2017-10-02T03:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the Expression if condition</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-the-Expression-if-condition/m-p/1377971#M420481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just add the null condition at the start of your IF condition like the below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max(Aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( isnull(min(BDate))=0 and isnull(min(CDate))=0 ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(InQuarter(min(CDate), Quarter_Start, 0) AND InQuarter(min([BDate]), Quarter_Start, 0), min(CDate) - min([BDate]),&lt;/P&gt;&lt;P&gt; IF (InQuarter(min(CDate), Quarter_Start, 0), min(CDate) - Quarter_Start,&lt;/P&gt;&lt;P&gt; IF (InQuarter(min([BDate]), Quarter_Start, 0), DayStart(Quarter_End) - min([BDate]),&lt;/P&gt;&lt;P&gt; IF (not(InQuarter(min(CDate), Quarter_Start, 0)) and not(InQuarter(min([BDate]), Quarter_Start, 0)) and min(CDate) &amp;gt; Quarter_Start and min([BDate]) &amp;lt; Quarter_End, Quarter_End - Quarter_Start&lt;/P&gt;&lt;P&gt;))))), Year, Order))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Oct 2017 04:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-the-Expression-if-condition/m-p/1377971#M420481</guid>
      <dc:creator>qliksus</dc:creator>
      <dc:date>2017-10-02T04:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the Expression if condition</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-the-Expression-if-condition/m-p/1377972#M420482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Susant.&lt;/P&gt;&lt;P&gt;Ramya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Oct 2017 23:22:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-the-Expression-if-condition/m-p/1377972#M420482</guid>
      <dc:creator>ramyasaiqv</dc:creator>
      <dc:date>2017-10-02T23:22:28Z</dc:date>
    </item>
  </channel>
</rss>

