<?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 If statement return incorrect Strings in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/If-statement-return-incorrect-Strings/m-p/2015237#M83883</link>
    <description>&lt;P&gt;Hi There&lt;/P&gt;
&lt;P&gt;Please assist on the following: I currently want my analysis to return the string where if the field &amp;lt;= 1.5 should return "Trips Depart &amp;lt;=90min" else should return "Trips Depart greater than 90min",&amp;nbsp;&lt;/P&gt;
&lt;P&gt;check I have wrote the logic on data loader :&lt;/P&gt;
&lt;P&gt;If((Interval("[Var Actual vs Planned]") &amp;lt;= 1.5) , 'Trips Depart &amp;lt;=90min of Planned Trip Start Time', &lt;BR /&gt;'Trips Depart Greater than 90min of Planned Trip Start Time') as [% of trips departing within 90 minutes ],&lt;/P&gt;
&lt;P&gt;But the above logic is not returning the correct values on the analyze sheet. The only time it returns the second statement (Trips Depart Greater than 90min of Planned Trip Start Time) it is when there is null or (-)value.&lt;/P&gt;
&lt;P&gt;please see the attachments and assist .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Mon, 12 Dec 2022 07:26:49 GMT</pubDate>
    <dc:creator>Thabang231</dc:creator>
    <dc:date>2022-12-12T07:26:49Z</dc:date>
    <item>
      <title>If statement return incorrect Strings</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-return-incorrect-Strings/m-p/2015237#M83883</link>
      <description>&lt;P&gt;Hi There&lt;/P&gt;
&lt;P&gt;Please assist on the following: I currently want my analysis to return the string where if the field &amp;lt;= 1.5 should return "Trips Depart &amp;lt;=90min" else should return "Trips Depart greater than 90min",&amp;nbsp;&lt;/P&gt;
&lt;P&gt;check I have wrote the logic on data loader :&lt;/P&gt;
&lt;P&gt;If((Interval("[Var Actual vs Planned]") &amp;lt;= 1.5) , 'Trips Depart &amp;lt;=90min of Planned Trip Start Time', &lt;BR /&gt;'Trips Depart Greater than 90min of Planned Trip Start Time') as [% of trips departing within 90 minutes ],&lt;/P&gt;
&lt;P&gt;But the above logic is not returning the correct values on the analyze sheet. The only time it returns the second statement (Trips Depart Greater than 90min of Planned Trip Start Time) it is when there is null or (-)value.&lt;/P&gt;
&lt;P&gt;please see the attachments and assist .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 07:26:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-return-incorrect-Strings/m-p/2015237#M83883</guid>
      <dc:creator>Thabang231</dc:creator>
      <dc:date>2022-12-12T07:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: If statement return incorrect Strings</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-return-incorrect-Strings/m-p/2015310#M83885</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;perhaps try this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If((Interval("[Var Actual vs Planned]") &amp;lt;= &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/FONT&gt;1.5&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/FONT&gt;) , 'Trips Depart &amp;lt;=90min of Planned Trip Start Time',&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Trips Depart Greater than 90min of Planned Trip Start Time') as [% of trips departing within 90 minutes ],&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 09:44:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-return-incorrect-Strings/m-p/2015310#M83885</guid>
      <dc:creator>brunobertels</dc:creator>
      <dc:date>2022-12-12T09:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: If statement return incorrect Strings</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-return-incorrect-Strings/m-p/2015328#M83888</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;P&gt;If((Interval("[Var Actual vs Planned]",&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;'mm'&lt;/STRONG&gt;&lt;/FONT&gt;) &amp;lt;= &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;90&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;)&lt;/FONT&gt;&lt;/FONT&gt; , 'Trips Depart &amp;lt;=90min of Planned Trip Start Time',&lt;BR /&gt;'Trips Depart Greater than 90min of Planned Trip Start Time') as [% of trips departing within 90 minutes ]&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;If((Interval("[Var Actual vs Planned]",&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;'mm'&lt;/STRONG&gt;&lt;/FONT&gt;) &amp;lt;=&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Interval('01:30','hh:mm')*24*60)&lt;/STRONG&gt;&lt;/FONT&gt; , 'Trips Depart &amp;lt;=90min of Planned Trip Start Time',&lt;BR /&gt;'Trips Depart Greater than 90min of Planned Trip Start Time') as [% of trips departing within 90 minutes ]&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 10:27:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-return-incorrect-Strings/m-p/2015328#M83888</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-12-12T10:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: If statement return incorrect Strings</title>
      <link>https://community.qlik.com/t5/App-Development/If-statement-return-incorrect-Strings/m-p/2015468#M83896</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16737"&gt;@BrunPierre&lt;/a&gt;&amp;nbsp; &amp;amp; &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48554"&gt;@brunobertels&lt;/a&gt;&amp;nbsp;thanks so much , i have tried to check the above solution and here is the one that best corrected my logic&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(Interval(&lt;SPAN&gt;[Var Actual vs Planned]&lt;/SPAN&gt;)&amp;gt;0,&lt;BR /&gt;if((Interval(&lt;SPAN&gt;[Var Actual vs Planned]&lt;/SPAN&gt;)*24)&amp;gt;1.5,&lt;BR /&gt;'Trips Depart Greater than 90min of Planned Trip Start Time','Trips Depart &amp;lt;=90min of Planned Trip Start Time'), &lt;BR /&gt;'Trips Depart &amp;lt;=90min of Planned Trip Start Time') as [% of trips departing within 90 minutes of the planned trip start ]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks once again!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 14:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-statement-return-incorrect-Strings/m-p/2015468#M83896</guid>
      <dc:creator>Thabang231</dc:creator>
      <dc:date>2022-12-12T14:15:17Z</dc:date>
    </item>
  </channel>
</rss>

