<?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: Help required in simple if-else condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852303#M1003433</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 added the following to one of my charts &amp;amp; it worked fine...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If([CONTACT DIRECTORATE] = 'CANCER' And Count([CONTACT DIRECTORATE]) &amp;gt;0, &lt;/P&gt;&lt;P&gt;//Then&lt;/P&gt;&lt;P&gt;&amp;nbsp; blue(),&lt;/P&gt;&lt;P&gt;//Else If&lt;/P&gt;&lt;P&gt;&amp;nbsp; If([CONTACT DIRECTORATE] = 'PATHOL' And Count([CONTACT DIRECTORATE]) &amp;gt;0, &lt;/P&gt;&lt;P&gt;//Then&lt;/P&gt;&lt;P&gt;&amp;nbsp; red(), &lt;/P&gt;&lt;P&gt;//Else&lt;/P&gt;&lt;P&gt;&amp;nbsp; green()))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2015 16:04:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-26T16:04:11Z</dc:date>
    <item>
      <title>Help required in simple if-else condition</title>
      <link>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852297#M1003427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;My requirement is to colour the backgroud (bakground colour) for a particular chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is to colour it&lt;/P&gt;&lt;P&gt;blue if Practice Area = AAA and &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vReqDateVar &amp;lt;= 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;red if Practice Area = BBB and &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;vReqDateVar &amp;lt;= 3&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;for rest its green.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For that I am using below expression in Background colour in expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if([Practice Area&amp;nbsp; ] = 'AAA' and vReqDateVar &amp;lt;= 2, blue(),&lt;/P&gt;&lt;P&gt;if([Practice Area&amp;nbsp; ] = 'BBB' and vReqDateVar &amp;lt;= 3, red(), green()))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it always returns Green.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please tell me what I did wrong. I am new to qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:28:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852297#M1003427</guid>
      <dc:creator>sayadutt</dc:creator>
      <dc:date>2015-05-26T15:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in simple if-else condition</title>
      <link>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852298#M1003428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would add a test Straight table chart with&amp;nbsp; Practice Area and vReqDateVar as dimensions and add this version of your background formula as the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([Practice Area&amp;nbsp; ] = 'AAA' and vReqDateVar &amp;lt;= 2, 'blue',&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([Practice Area&amp;nbsp; ] = 'BBB' and vReqDateVar &amp;lt;= 3, 'red', 'green')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should then be able to see the values for the data and the result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:35:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852298#M1003428</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-05-26T15:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in simple if-else condition</title>
      <link>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852299#M1003429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Albert,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;vReqDateVar is a variable which is calculating difference in 2 dates.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;my &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;vReqDateVar is defined as = Date#([Requirements Actual Date&amp;nbsp; ]) - Date#([Requirements Planned Date&amp;nbsp; ])&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;It returns numbers.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;I tried your above code, but does not return any color. (I also added 1 missing paranthesis at the end)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;Can you please suggest.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:43:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852299#M1003429</guid>
      <dc:creator>sayadutt</dc:creator>
      <dc:date>2015-05-26T15:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in simple if-else condition</title>
      <link>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852300#M1003430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try using &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Practice Area]&amp;nbsp; instead of &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Practice Area&amp;nbsp; ]&amp;nbsp; ?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:46:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852300#M1003430</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2015-05-26T15:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in simple if-else condition</title>
      <link>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852301#M1003431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, thats not the issue. Other graphs work with &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Practice Area&amp;nbsp; ] .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I guess the issue is with else part. My code always going to else part and printing green.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if([Practice Area&amp;nbsp; ] = 'AAA' and vReqDateVar &amp;lt;= 2, blue(),&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if([Practice Area&amp;nbsp; ] = 'BBB' and vReqDateVar &amp;lt;= 3, red(), green()))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:48:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852301#M1003431</guid>
      <dc:creator>sayadutt</dc:creator>
      <dc:date>2015-05-26T15:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in simple if-else condition</title>
      <link>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852302#M1003432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add a dummy expression&amp;nbsp; =1 so you can see all values&lt;/P&gt;&lt;P&gt;or set the Presentation sheet so Missing and Zero Values are not suppressed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:55:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852302#M1003432</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-05-26T15:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in simple if-else condition</title>
      <link>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852303#M1003433</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 added the following to one of my charts &amp;amp; it worked fine...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If([CONTACT DIRECTORATE] = 'CANCER' And Count([CONTACT DIRECTORATE]) &amp;gt;0, &lt;/P&gt;&lt;P&gt;//Then&lt;/P&gt;&lt;P&gt;&amp;nbsp; blue(),&lt;/P&gt;&lt;P&gt;//Else If&lt;/P&gt;&lt;P&gt;&amp;nbsp; If([CONTACT DIRECTORATE] = 'PATHOL' And Count([CONTACT DIRECTORATE]) &amp;gt;0, &lt;/P&gt;&lt;P&gt;//Then&lt;/P&gt;&lt;P&gt;&amp;nbsp; red(), &lt;/P&gt;&lt;P&gt;//Else&lt;/P&gt;&lt;P&gt;&amp;nbsp; green()))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 16:04:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852303#M1003433</guid>
      <dc:creator />
      <dc:date>2015-05-26T16:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in simple if-else condition</title>
      <link>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852304#M1003434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the content of your variable &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vReqDateVar - does this just contain a value, or is it an expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;If it is an expression then you may need to dollar sign expand it, eg. $(vReqDateVar).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;The space in your field name looks odd, I would try removing that.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Test things by adding [Practice Area] as a dimension, and vReqDateVar as an expression, this way you can see what values are being used.&amp;nbsp; You can also replace the colours in your colour expression with integers and have that as an expression.&amp;nbsp; You can then see if you get the right values out of the if statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Additional: Sorry, just seen your response earlier, I strongly suspect it is the $(vReqDateVar) syntax you need. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 16:15:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852304#M1003434</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2015-05-26T16:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in simple if-else condition</title>
      <link>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852305#M1003435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sayantan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can add the application it will be more clear. because your expression is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Nithin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 16:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-required-in-simple-if-else-condition/m-p/852305#M1003435</guid>
      <dc:creator>nithin_miryala</dc:creator>
      <dc:date>2015-05-26T16:30:12Z</dc:date>
    </item>
  </channel>
</rss>

