<?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 condition in Load statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2208#M609002</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes calculate from previous month. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt; Current month Jan 2018&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Flag like this&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Jan 2017 - Dec 2017&amp;nbsp; - '1-12 months'&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Jan 2015 - Dec 2016&amp;nbsp; - '13-36 months'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Jan 2013 - Dec 2014&amp;nbsp; - '37-60 months'&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jan 2018 14:29:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-01-17T14:29:22Z</dc:date>
    <item>
      <title>If condition in Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2205#M608999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please help me to flag like below in load statement. If date field is null should be flag as 'New'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CustID, Max_Sales_Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, 2/14/2013&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, 6/4/2015&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5, 1/5/2016&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6, 1/24/2017&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 13&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="imglo.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/190361_imglo.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:03:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2205#M608999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-17T14:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: If condition in Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2206#M609000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this way &lt;A href="https://community.qlik.com/docs/DOC-8276"&gt;Bucket Creation In List Box&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:07:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2206#M609000</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-01-17T14:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: If condition in Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2207#M609001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what the logic for the flag field ? Null i can understand but what about the others ? you calculate it from current date or you just check if it is in which year and assign flag. It will be easier to help and write the exact expression if you explain this logic .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2207#M609001</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2018-01-17T14:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: If condition in Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2208#M609002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes calculate from previous month. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt; Current month Jan 2018&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Flag like this&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Jan 2017 - Dec 2017&amp;nbsp; - '1-12 months'&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Jan 2015 - Dec 2016&amp;nbsp; - '13-36 months'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Jan 2013 - Dec 2014&amp;nbsp; - '37-60 months'&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:29:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2208#M609002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-17T14:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: If condition in Load statement</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2209#M609003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you mean this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Flag like this&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Jan 2017 - Dec &lt;STRONG style="color: #ff6600;"&gt;2017&lt;/STRONG&gt;&amp;nbsp; - '1-12 months'&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Jan 2015 - Dec &lt;STRONG style="color: #ff6600;"&gt;2017&lt;/STRONG&gt;&amp;nbsp; - '13-36 months'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Jan 2013 - Dec &lt;STRONG style="color: #ff6600;"&gt;2017&lt;/STRONG&gt;&amp;nbsp; - '37-60 months'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;May be try this below and let us know. Ref taken from here : &lt;A href="https://community.qlik.com/thread/47580"&gt;How Do I Get the Number of Months Between Two Dates?&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;DateFlag:&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(MonthDiff &amp;gt;= 0 AND MonthDiff &amp;lt;= 12, '1-12Months', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(MonthDiff &amp;gt;=12 AND MonthDiff &amp;lt;= 24, '13-24Months',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(MonthDiff &amp;gt;=24 AND MonthDiff &amp;lt;= 36, '25-36Months',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(MonthDiff &amp;gt;=36 AND MonthDiff &amp;lt;= 48, '36-48Months',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(MonthDiff &amp;gt;=48 AND MonthDiff &amp;lt;= 60, '48-60Months', MonthDiff))))) AS DateFlag;&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(ISNULL(DateField) = -1, 'Null', ((year(Today(2))*12)+month(Today(2))) - (((year(Max_Sales_Date)*12)+ month(Max_Sales_Date)))) AS MonthDiff&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD *, Alt(Date(Max_Sales_Date, 'MM/DD/YYYY'), Null()) AS DateField &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;CustID, Max_Sales_Date&lt;/P&gt;&lt;P&gt;2, 2/14/2013&lt;/P&gt;&lt;P&gt;3, 6/4/2015&lt;/P&gt;&lt;P&gt;5, 1/5/2016&lt;/P&gt;&lt;P&gt;6, 1/24/2017&lt;/P&gt;&lt;P&gt;13,&lt;/P&gt;&lt;P&gt;14,&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 16:00:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-in-Load-statement/m-p/2209#M609003</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-01-17T16:00:16Z</dc:date>
    </item>
  </channel>
</rss>

