<?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 else condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-else-condition/m-p/1146258#M375041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If( [Start Date] = [End Date], 'Active', If(&lt;SPAN style="font-size: 13.3333px;"&gt; [Start Date] &amp;lt; [End Date],'Expired','Not defined')) AS Status&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming your dates have been interpreted as dates and are not in fact timestamps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are unsure and the format of your input records is 'YYYY-MM-DD', try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET DateFormat = 'YYYY-MM-DD';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Start Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [End Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;If( Floor([Start Date]) = Floor([End Date]), 'Active', If(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; Floor([Start Date]) &amp;lt; Floor([End Date]),'Expired','Not defined')) AS Status,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 May 2016 16:18:09 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-05-25T16:18:09Z</dc:date>
    <item>
      <title>if else condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-else-condition/m-p/1146257#M375040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&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;I am facing issue with one logic. I have two date field Start Date and End Date.&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;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;I want if Start Date=End Date,then show Active and if StartDate&amp;lt;End Date, &lt;/SPAN&gt;then show Expired.&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;If(Date(StartDate,'YYYY-MM-DD'),'Active',if(Date(End Date,'YYYY-MM-DD'),'Expired') as Status&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;But this is not working. Any idea how to resolve this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 16:08:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-else-condition/m-p/1146257#M375040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-25T16:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: if else condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-else-condition/m-p/1146258#M375041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If( [Start Date] = [End Date], 'Active', If(&lt;SPAN style="font-size: 13.3333px;"&gt; [Start Date] &amp;lt; [End Date],'Expired','Not defined')) AS Status&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming your dates have been interpreted as dates and are not in fact timestamps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are unsure and the format of your input records is 'YYYY-MM-DD', try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET DateFormat = 'YYYY-MM-DD';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Start Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [End Date],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;If( Floor([Start Date]) = Floor([End Date]), 'Active', If(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; Floor([Start Date]) &amp;lt; Floor([End Date]),'Expired','Not defined')) AS Status,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 16:18:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-else-condition/m-p/1146258#M375041</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-25T16:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: if else condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-else-condition/m-p/1146259#M375042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;If(Date(StartDate,'YYYY-MM-DD'),'Active',if(Date(End Date,'YYYY-MM-DD'),'Expired') as Status&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;In your IF statements there are no logic statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;IF statement is defined as &lt;EM&gt;IF(condition, then, else)&lt;/EM&gt;. The first one, &lt;SPAN class="Italic"&gt;condition&lt;/SPAN&gt;, is interpreted logically - TRUE, FALSE. The &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date(StartDate,'YYYY-MM-DD') and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date(End Date,'YYYY-MM-DD') cannot be interpreted as condition that returns TRUE (-1), FALSE (0).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Please let as know if the swuehl suggestion works for you.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 19:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-else-condition/m-p/1146259#M375042</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2016-05-25T19:26:38Z</dc:date>
    </item>
  </channel>
</rss>

