<?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 Problem with expression where field is blank in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324495#M1195867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For handling nulls the best thing u can do is to get the length.&lt;/P&gt;&lt;P&gt;U can try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Len(TransInYearMonth&amp;lt;0 ),1,0) as NullFlag&lt;/P&gt;&lt;P&gt;and use this in your expression:&lt;/P&gt;&lt;P&gt;-1 &amp;lt;NullFlag= {"1"}&amp;gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Srihari&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Apr 2011 13:24:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-26T13:24:38Z</dc:date>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324488#M1195860</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 have a nar chart with 2 expressions. The first expression shows me the average number of "days since last movement" on the account where the "Transaction Amount" Field is not blank. The second expression should show me the exact same thing, but where the Transaction Amount field IS blank. The first one works 100%, but the second expression returns nothing. Can someone see what is wrong with my second expression?&lt;/P&gt;&lt;P&gt;Expression 1: &lt;STRONG&gt;&lt;EM&gt;Avg({1&amp;lt;[Trans Amount]-={} &amp;gt;} [Days since last movement])&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Expression 2: &lt;STRONG&gt;&lt;EM&gt;Avg({1&amp;lt;[Trans Amount]={} &amp;gt;} [Days since last movement])&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 12:39:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324488#M1195860</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-26T12:39:50Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324489#M1195861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to create a flag in your load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(isnull(YourField),'Y','N') as NullFlag&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change your expression to :&lt;/P&gt;&lt;P&gt;Avg({&amp;lt;NullFlag={'Y"}&amp;gt;} [Days since last movement])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dinesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 12:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324489#M1195861</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-04-26T12:45:58Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324490#M1195862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure where I would put that in, as there techically are no blanks in this field...&lt;/P&gt;&lt;P&gt;What I do is load an excel spreadsheet with account numbers, then I load daily transaction extracts with the following WHERE clause:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;WHERE ([Tran Code]=35 or [Tran Code]=36) and exists([Account No])&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So only transactions where the account numbers match an account number in the very first list will be loaded.&lt;/P&gt;&lt;P&gt;So the "Trans Amount" field will only be blank if this person has not yet made a purchase, i.e. he is not in the transaction extracts.&lt;/P&gt;&lt;P&gt;Did I confuse the matter now?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 12:52:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324490#M1195862</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-26T12:52:52Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324491#M1195863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;KIndly try inserting only single quotes like ''&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:12:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324491#M1195863</guid>
      <dc:creator>gauravkhare</dc:creator>
      <dc:date>2011-04-26T13:12:03Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324492#M1195864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gaurav,&lt;/P&gt;&lt;P&gt;I have tried both single and double quotes, with and without spaces between them - nothing seems to work...&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:14:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324492#M1195864</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-26T13:14:26Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324493#M1195865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gerhardl - Have you tried using the Null() function within your second expression?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:20:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324493#M1195865</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-04-26T13:20:08Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324494#M1195866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DV,&lt;/P&gt;&lt;P&gt;No - please could you show me how? On this expression&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Avg({$&amp;lt;[Trans Amount]={} &amp;gt;} [Days since last movement])&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324494#M1195866</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-26T13:23:14Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324495#M1195867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For handling nulls the best thing u can do is to get the length.&lt;/P&gt;&lt;P&gt;U can try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Len(TransInYearMonth&amp;lt;0 ),1,0) as NullFlag&lt;/P&gt;&lt;P&gt;and use this in your expression:&lt;/P&gt;&lt;P&gt;-1 &amp;lt;NullFlag= {"1"}&amp;gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Srihari&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:24:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324495#M1195867</guid>
      <dc:creator />
      <dc:date>2011-04-26T13:24:38Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324496#M1195868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alternatively, can i not exclude a certain selection?&lt;/P&gt;&lt;P&gt;So I would say&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Avg( [Days since last movement]) but EXCLUDE where [Trans Amount]-={}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How can I do that???&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324496#M1195868</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-26T13:26:21Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324497#M1195869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check this below Expression helps you.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Avg({&amp;lt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;[Days since last movement] = {"=len(&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;[Trans Amount&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;)=0"}&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;gt;}&lt;/EM&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM&gt;[Days since last movement]&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Untested expression.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;- Sridhar&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:27:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324497#M1195869</guid>
      <dc:creator />
      <dc:date>2011-04-26T13:27:44Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324498#M1195870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I'm afraid that also returns nothing...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:31:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324498#M1195870</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-26T13:31:28Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324499#M1195871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, How about using len() function? You can try this: avg( {1} [Days since last movement]) ) Hope this helps&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:32:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324499#M1195871</guid>
      <dc:creator>lgz</dc:creator>
      <dc:date>2011-04-26T13:32:48Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324500#M1195872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I managed to figure it out.&lt;/P&gt;&lt;P&gt;I created a bookmark where all accounts with a transaction are selected. Then I exclude the bookmark in my expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Avg ({1-Bookmark01} [Days since last movement])&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks for everyone's input. What a mission that was.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:40:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324500#M1195872</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2011-04-26T13:40:03Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324501#M1195873</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 like this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normal 0 false false false EN-US X-NONE X-NONE&lt;/P&gt;&lt;P&gt;Normal 0 false false false EN-US X-NONE X-NONE&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;B&gt;Avg({$&amp;lt;[Trans Amount]={''=len(Trans Amount)=0"} &amp;gt;} [Days since last movement])&lt;/B&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;B&gt;&lt;BR /&gt;&lt;/B&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Normal 0 false false false EN-US X-NONE X-NONE&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;B&gt;Regards,&lt;/B&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;B&gt;Sampath Kumar . G&lt;BR /&gt;&lt;/B&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324501#M1195873</guid>
      <dc:creator />
      <dc:date>2011-04-26T13:43:52Z</dc:date>
    </item>
    <item>
      <title>Problem with expression where field is blank</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324502#M1195874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look at the attached application.&lt;/P&gt;&lt;P&gt;If this also doesn't solve the your problem. post the sample data with your required output.&lt;/P&gt;&lt;P&gt;- Sridhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 13:45:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-expression-where-field-is-blank/m-p/324502#M1195874</guid>
      <dc:creator />
      <dc:date>2011-04-26T13:45:09Z</dc:date>
    </item>
  </channel>
</rss>

