<?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 Variables as part of an IF expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variables-as-part-of-an-IF-expression/m-p/539398#M201534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following IF statement that I would like to use. I have a table with an expression =&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vPatientAge)&amp;nbsp; &lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;which works fine. From this I wanted to set up some age groups, so I wrote this: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;AGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;IncDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(vPatientAge)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;0, 'INVALID',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;AGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;IncDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(vPatientAge)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;18, '0-17',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;AGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;IncDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(vPatientAge)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;65, '18-64',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;AGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;IncDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(vPatientAge)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;100, '65-99',&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;AGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;IncDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(vPatientAge)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;120, '100-120', 'OVER 120')))))&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; The IF statement only returns a value of 'OVER 120' what ever the value returned by the variable. Am I doing something wrong in the expression that anyone can see?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Many thanks&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; Phil&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jul 2013 08:27:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-07-04T08:27:10Z</dc:date>
    <item>
      <title>Variables as part of an IF expression</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-as-part-of-an-IF-expression/m-p/539398#M201534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following IF statement that I would like to use. I have a table with an expression =&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vPatientAge)&amp;nbsp; &lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;which works fine. From this I wanted to set up some age groups, so I wrote this: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;AGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;IncDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(vPatientAge)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;0, 'INVALID',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;AGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;IncDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(vPatientAge)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;18, '0-17',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;AGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;IncDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(vPatientAge)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;65, '18-64',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;AGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;IncDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(vPatientAge)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;100, '65-99',&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;AGE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;IncDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 10pt;"&gt;$(vPatientAge)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&amp;lt;120, '100-120', 'OVER 120')))))&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; The IF statement only returns a value of 'OVER 120' what ever the value returned by the variable. Am I doing something wrong in the expression that anyone can see?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Many thanks&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; Phil&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 08:27:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-as-part-of-an-IF-expression/m-p/539398#M201534</guid>
      <dc:creator />
      <dc:date>2013-07-04T08:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: Variables as part of an IF expression</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-as-part-of-an-IF-expression/m-p/539399#M201535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post an example document:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-1290" style="font-size: 12px; color: #007fc0; font-family: Arial;"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 09:13:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-as-part-of-an-IF-expression/m-p/539399#M201535</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-07-04T09:13:36Z</dc:date>
    </item>
  </channel>
</rss>

