<?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: Dealing with null value in variable (inputbox) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762963#M1296678</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cristian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use (isnull) function &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Feb 2015 16:24:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-02-20T16:24:39Z</dc:date>
    <item>
      <title>Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762960#M1296675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just think that variable management isn't developed good enough in Qlikview or I just can't get it right (maybe the second affirmation is more probable) .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get one variable defined in an input box and want to do some calculations with it and null case is a big deal for me, I attached a qvw file to illustrate the situation at a basic level but the expressions I'm using are:&lt;/P&gt;&lt;P&gt;- Left text box: =If($(=len(vVariable))=0, 'Empty', $(vVariable)) =&amp;gt; Works good, shows variable value without a problem and 'Empty' when null&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Right text box: =If($(=len(vVariable))=0, 'Empty', 'Value: '&amp;amp;$(vVariable)) =&amp;gt; Works good with value, when null I get Expression Error (as you first see)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is pretty basic but if you replace the else case by another if condition using the vVariable get the same issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know how can I correctly handle null value on this case?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762960#M1296675</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762961#M1296676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cristian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there's &lt;STRONG&gt;no QVW&lt;/STRONG&gt; attached to post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 16:18:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762961#M1296676</guid>
      <dc:creator>awhitfield</dc:creator>
      <dc:date>2015-02-20T16:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762962#M1296677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set a constraint on the input box so the variable cannot be null. Use &lt;STRONG&gt;len($)&amp;gt;0&lt;/STRONG&gt; as Custom Input Constraint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if your variable should contain a number perhaps you can use the alt function: alt($(vVariable), 1234). If vVariable does not contain a number the alt function will return the second parameter as value (1234 in the example).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 16:22:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762962#M1296677</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-02-20T16:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762963#M1296678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cristian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use (isnull) function &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 16:24:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762963#M1296678</guid>
      <dc:creator />
      <dc:date>2015-02-20T16:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762964#M1296680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad, thanks for pointing that out. I edited first post to attach the file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 16:51:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762964#M1296680</guid>
      <dc:creator />
      <dc:date>2015-02-20T16:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762965#M1296681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I'm really doing is having filters by numbers of ocurrences of a set of hospitalary events and actually need null for exclude some events from my calculation so I can't validate that the input have a value and 0 is a valid value in the calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(alt($(vVariable), -1)=-1, 'Empty', $(vVariable)) doesn't work for identify null values, also the problem isn't identifying them (len works just good for that), the problem is that in the else part, I can't use the variable when it has null value. Please see the file attached to my first post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 16:56:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762965#M1296681</guid>
      <dc:creator />
      <dc:date>2015-02-20T16:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762966#M1296683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It was my first choice but there's a problem: apparently you can't invoke a function in a variable with null value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with this expression: =If(IsNull($(vVariable)), 'Empty', $(vVariable))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And got: Error: Error in expression:&lt;/P&gt;&lt;P&gt;IsNull takes 1 parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is that the behaviour is like the variable doesn't exists at all in case of null value but can't find any function like PHP's isset. I also tried my len approach $(=isNull(vVariable)) without any luck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the file attached to my first post to see the errors I'm having&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 17:01:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762966#M1296683</guid>
      <dc:creator />
      <dc:date>2015-02-20T17:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762967#M1296684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't expand the variable in the expression in the text boxes:&lt;/P&gt;&lt;P&gt;=If($(=len(vVariable))=0, 'Empty', vVariable)&lt;/P&gt;&lt;P&gt;=If($(=len(vVariable))=0, 'Empty', 'Value: ' &amp;amp; vVariable)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 17:17:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762967#M1296684</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-02-20T17:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762968#M1296686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works Gysbert thanks but why you don't have to expand the variable? I'm having hard times figuring out when to expand, when no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My original expression was:&lt;/P&gt;&lt;P&gt;=If($(=len(vFiltroConsultaEspecialista))&amp;gt;0, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(COUNT({$&amp;lt;CodConsulta={5}, Año={$(=Max(Año))}&amp;gt;} DISTINCT IdActividad)&amp;gt;=vFiltroConsultaEspecialista, COUNT(DISTINCT IdAfiliado_Programa), 'No Value')&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works now without expanding in the inner If&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 17:24:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762968#M1296686</guid>
      <dc:creator />
      <dc:date>2015-02-20T17:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762969#M1296688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried on your qvw and it worked.&lt;/P&gt;&lt;P&gt;find the attachment.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vVariable&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;='','Empty',&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vVariable&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Feb 2015 18:00:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762969#M1296688</guid>
      <dc:creator />
      <dc:date>2015-02-20T18:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762970#M1296690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rakesh, I still want to know when to expand and when not using expressions in another variables, do you know the common scenarios?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 16:36:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762970#M1296690</guid>
      <dc:creator />
      <dc:date>2015-02-24T16:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762971#M1296693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did not understand you question? &lt;/P&gt;&lt;P&gt;could you please describe? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 17:03:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762971#M1296693</guid>
      <dc:creator />
      <dc:date>2015-02-24T17:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762972#M1296695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean, when do I have to expand the variable and when no? My expression =If($(=len(vVariable))=0, 'Empty', vVariable) was for another variable in this case. I identify this cases:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Using functions: call the function in the expansion of the variable&lt;/P&gt;&lt;P&gt;- len($vVariable) =&amp;gt; doesn't work&lt;/P&gt;&lt;P&gt;- len(vVariable) =&amp;gt; probably work, haven't tried&lt;/P&gt;&lt;P&gt;- $(=len(vVariable) =&amp;gt; Works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Conditionals: not expand the variable&lt;/P&gt;&lt;P&gt;- If(condition, $(vVariable), 0) =&amp;gt; doesn't work (although it wasn't error)&lt;/P&gt;&lt;P&gt;- If(condition, vVariable, 0) =&amp;gt; Works&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wan to better determine these cases or the cases that actually apply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 17:14:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762972#M1296695</guid>
      <dc:creator />
      <dc:date>2015-02-24T17:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dealing with null value in variable (inputbox)</title>
      <link>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762973#M1296698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok,&lt;/P&gt;&lt;P&gt;when you'll apply a condition you just need to write variable name no need to apply '$' sign.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 17:20:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Dealing-with-null-value-in-variable-inputbox/m-p/762973#M1296698</guid>
      <dc:creator />
      <dc:date>2015-02-24T17:20:18Z</dc:date>
    </item>
  </channel>
</rss>

