<?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 SV:If-else statement in LOAD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154451#M31062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the solution, it works for me.&lt;/P&gt;&lt;P&gt;But it wont work if i'm using the new name after the AS&lt;BR /&gt;&lt;BR /&gt;Load&lt;BR /&gt;Field1 as Fieldtext&lt;BR /&gt;if (Fieldtext = abc, .........&lt;/P&gt;&lt;P&gt;i had to use...Field1 instead of Fieldtext. any idea why?&lt;BR /&gt;&lt;BR /&gt;Load&lt;BR /&gt;Field1 as Fieldtext&lt;BR /&gt;if (Field1 = abc, .........&lt;/P&gt;&lt;P&gt;the reason is that Field1 could be a very long formula or IF ELSE statment, so it'd be good if i can just use Fieldtext as a substitute..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Nov 2009 18:41:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-11-26T18:41:08Z</dc:date>
    <item>
      <title>If-else statement in LOAD</title>
      <link>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154448#M31059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;i'm trying to to create if-else in LOAD in script level.&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;ID,&lt;BR /&gt;(A+B+C) as F1;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM TABLE&lt;/P&gt;&lt;P&gt;the if-else would be placed at the calculation,&lt;BR /&gt;&lt;BR /&gt;column F1 = if (a+b+c) &amp;gt; 20 then set F1 as DIGIT 1 else 0 so that i can use it to count.&lt;BR /&gt;&lt;BR /&gt;Column F2 = if (a+b+c) &amp;lt; 20 then set F2 as DIGIT 1 else 0....&lt;BR /&gt;&lt;BR /&gt;so in the end, i'd have 3 column, ID, F1, F2&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2009 18:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154448#M31059</guid>
      <dc:creator />
      <dc:date>2009-11-17T18:21:50Z</dc:date>
    </item>
    <item>
      <title>If-else statement in LOAD</title>
      <link>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154449#M31060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Try the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;ID,&lt;BR /&gt;IF(A+B+C &amp;gt; 20 , 1 , 0) AS F1,&lt;BR /&gt;IF(A+B+C &amp;lt; 20 , 1, 0) AS F2;&lt;BR /&gt;SQL SELECT * FROM TABLE;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2009 19:21:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154449#M31060</guid>
      <dc:creator />
      <dc:date>2009-11-17T19:21:16Z</dc:date>
    </item>
    <item>
      <title>SV:If-else statement in LOAD</title>
      <link>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154450#M31061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LOAD&lt;BR /&gt;ID,&lt;BR /&gt;if ((A+B+C)&amp;gt;20,1) as F1,&lt;BR /&gt;if ((A+B+C)&amp;lt;20,1) as F2;&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM TABLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2009 19:21:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154450#M31061</guid>
      <dc:creator />
      <dc:date>2009-11-17T19:21:29Z</dc:date>
    </item>
    <item>
      <title>SV:If-else statement in LOAD</title>
      <link>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154451#M31062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the solution, it works for me.&lt;/P&gt;&lt;P&gt;But it wont work if i'm using the new name after the AS&lt;BR /&gt;&lt;BR /&gt;Load&lt;BR /&gt;Field1 as Fieldtext&lt;BR /&gt;if (Fieldtext = abc, .........&lt;/P&gt;&lt;P&gt;i had to use...Field1 instead of Fieldtext. any idea why?&lt;BR /&gt;&lt;BR /&gt;Load&lt;BR /&gt;Field1 as Fieldtext&lt;BR /&gt;if (Field1 = abc, .........&lt;/P&gt;&lt;P&gt;the reason is that Field1 could be a very long formula or IF ELSE statment, so it'd be good if i can just use Fieldtext as a substitute..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 18:41:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154451#M31062</guid>
      <dc:creator />
      <dc:date>2009-11-26T18:41:08Z</dc:date>
    </item>
    <item>
      <title>SV:If-else statement in LOAD</title>
      <link>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154452#M31063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If FieldName is a long field or a formula you can replace it by a variable such as&lt;/P&gt;&lt;P&gt;LET MyFieldName='LongFieldNameBlablabla';&lt;/P&gt;&lt;P&gt;Thenin your Load&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;IF("$(MyFieldName)" = abc, ....) then it should work.&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Sébastien&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 18:55:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154452#M31063</guid>
      <dc:creator />
      <dc:date>2009-11-26T18:55:46Z</dc:date>
    </item>
    <item>
      <title>AW:Re: SV:If-else statement in LOAD</title>
      <link>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154453#M31064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can stack LOAD statements like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;tablename:&lt;BR /&gt;LOAD Field3;&lt;BR /&gt;LOAD if(Field2 = 'def', ...) as Field3;&lt;BR /&gt;LOAD if(Field1 = 'abc', ...) as Field2 FROM....;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Nov 2009 19:11:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-else-statement-in-LOAD/m-p/154453#M31064</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2009-11-26T19:11:11Z</dc:date>
    </item>
  </channel>
</rss>

