<?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 Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756781#M1024214</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like an aggregation function like FirstValue. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Mar 2015 09:09:04 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2015-03-20T09:09:04Z</dc:date>
    <item>
      <title>if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756777#M1024210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Expets,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to write the below expression in our Script part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 836pt; border-collapse: collapse;" width="1114"&gt;&lt;TBODY&gt;&lt;TR style="height: 25.5pt;"&gt;&lt;TD class="xl65" height="34" style="background-color: transparent; width: 836pt; height: 25.5pt; border: windowtext 0.5pt solid;" width="1114"&gt;&lt;SPAN style="font-family: Times New Roman; color: #000000;"&gt;First(IIf([Template]="Retail",[BaselII_Category] &amp;amp; " Pooled",[Cust_Name])) &lt;BR /&gt;If Cust Name is Blank,Null then Use Cust ID. If Cust ID is also blannk use Basel Category&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 08:33:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756777#M1024210</guid>
      <dc:creator>priyarane</dc:creator>
      <dc:date>2015-03-20T08:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756778#M1024211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;First(IIf([Template]="Retail",[BaselII_Category] &amp;amp; " Pooled",[Cust_Name]))&lt;/P&gt;



&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;if(Template='Retail',BaselII_Category &amp;amp; ' Pooled',Cust_Name)&lt;/P&gt;&lt;P&gt;No idea what your First does, so I don't know what the Qlikview equivalent is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;If Cust Name is Blank,Null then Use Cust ID. If Cust ID is also blannk use Basel Category&lt;/P&gt;



&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;if(len(trim([Cust Name]))=0, if(len(trim([Cust ID]))=0,BaselII_Category,[Cust ID]),[Cust Name])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:00:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756778#M1024211</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-03-20T09:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756779#M1024212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think there are not one but two expressions in your quote.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;This looks like an MS-Access expression. Try:&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FIRST 1 LOAD IF ([Template] = 'Retail', [BaselII_Category] &amp;amp; ' Pooled', [Cust Name]) AS NewColumn FROM ...;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;This looks like a requirement in plain English. Try this (replace names with the actual column names):&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;IF (len(trim([Cust Name])) = 0, if (len(trim([Cust ID])) = 0, [Basel Category], [Cust ID]), [Cust Name]) AS [Cust Name], ...&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:05:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756779#M1024212</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-03-20T09:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756780#M1024213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In MS-Acces, First() loads the first value in a table column. I didn't know that you could embed IF expressions as a parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:07:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756780#M1024213</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-03-20T09:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756781#M1024214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like an aggregation function like FirstValue. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:09:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756781#M1024214</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-03-20T09:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756782#M1024215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u please explain u r first condition --&amp;gt; &lt;SPAN style="color: #000000; font-family: 'Times New Roman'; font-size: 13px;"&gt;First(IIf([Template]="Retail",[BaselII_Category] &amp;amp; " Pooled",[Cust_Name])) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;for second u can try --&amp;gt;&lt;/P&gt;&lt;P&gt;if(Isnull([&lt;SPAN style="color: #000000; font-family: 'Times New Roman'; font-size: 13px;"&gt;Cust Name])=-1, if(isnull([Cust ID]) =-1, [&lt;SPAN style="color: #000000; font-family: 'Times New Roman'; font-size: 13px;"&gt;Basel Category],&lt;SPAN style="color: #000000; font-family: 'Times New Roman'; font-size: 13px;"&gt;[Cust ID])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:09:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756782#M1024215</guid>
      <dc:creator>mukesh24</dc:creator>
      <dc:date>2015-03-20T09:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756783#M1024216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could be, but the entire context is missing from the OP. A simple FIRST 1 prefix may be a solution too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:11:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756783#M1024216</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-03-20T09:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756784#M1024217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756784#M1024217</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-03-20T09:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756785#M1024218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=First(If([Template]="Retail",[BaselII_Category] ,"Pooled"),[Cust_Name])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756785#M1024218</guid>
      <dc:creator />
      <dc:date>2015-03-20T09:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756786#M1024219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right now we can leave about First.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I write expression like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Template&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; = 'Retail' ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BaselII_Category&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &amp;amp;'-'&amp;amp; 'Pooled',&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;trim&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))=0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;) = -1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;trim&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))=0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;) = -1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BaselII_Category&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:35:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756786#M1024219</guid>
      <dc:creator>priyarane</dc:creator>
      <dc:date>2015-03-20T09:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756787#M1024220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right now we can leave about First.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I write expression like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Template&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; = 'Retail' ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BaselII_Category&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &amp;amp;'-'&amp;amp; 'Pooled',&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;trim&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))=0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;) = -1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;trim&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))=0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;) = -1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BaselII_Category&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:36:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756787#M1024220</guid>
      <dc:creator>priyarane</dc:creator>
      <dc:date>2015-03-20T09:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756788#M1024221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now we can leave about First.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I write expression like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Template&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; = 'Retail' ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BaselII_Category&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &amp;amp;'-'&amp;amp; 'Pooled',&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;trim&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))=0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;) = -1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;trim&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))=0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;) = -1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BaselII_Category&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756788#M1024221</guid>
      <dc:creator>priyarane</dc:creator>
      <dc:date>2015-03-20T09:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756789#M1024222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter, Can I go like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Template&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; = 'Retail' ,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BaselII_Category&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &amp;amp;'-'&amp;amp; 'Pooled',&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;trim&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))=0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;) = -1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;len&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;trim&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))=0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IsNull&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;) = -1,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;BaselII_Category&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Cust_Name&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:44:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756789#M1024222</guid>
      <dc:creator>priyarane</dc:creator>
      <dc:date>2015-03-20T09:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756790#M1024223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The isnull() function isn't necessary. Len(trim(...)) is also 0 for null values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (Template = 'Retail' ,BaselII_Category &amp;amp;'-'&amp;amp; 'Pooled',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(len(trim(Cust_Name))=0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(len(trim(CIF_Cust_ID))=0&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; BaselII_Category, &lt;SPAN style="font-size: 13.3333330154419px;"&gt;CIF_Cust_ID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;),&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Cust_Name&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; as Cust_Name,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 09:53:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756790#M1024223</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-03-20T09:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: if Statement</title>
      <link>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756791#M1024224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can but IMHO it will not produce the results you expect. For example, if [Cust_Name] contains data, it may end up being changed into a NULL value. Two points:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Drop every IsNull() = -1 logical expression. The trick with len(trim()) handles NULL values too.&lt;/LI&gt;&lt;LI&gt;Consider this pseudo-code representation of your entire IF expression. I added a default NULL-value. Is this correct?&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;IF Template = Retail&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;THEN Cust_Name = BaselII_Category &amp;amp; '-' &amp;amp; 'Pooled'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;ELSE&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; IF Cust_Name is NULL or empty string&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; THEN Cust_Name = CIF_Cust_ID&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; ELSE&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF CIF_Cust_ID is NULL or empty string&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; THEN Cust_Name = BaselII_Category&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ELSE Cust_Name = NULL&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2015 10:00:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-Statement/m-p/756791#M1024224</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-03-20T10:00:51Z</dc:date>
    </item>
  </channel>
</rss>

