<?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 Background colorization using IF AND in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Background-colorization-using-IF-AND/m-p/2044075#M1222826</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to write a function that would do background colorization, for example:&lt;/P&gt;
&lt;P&gt;1. If the attribute value is more than 0.98, color the cells red&lt;/P&gt;
&lt;P&gt;2. If the attribute value is more than 0.85 and less than 0.98, color the cells orange&lt;/P&gt;
&lt;P&gt;I wrote this:&lt;/P&gt;
&lt;P&gt;if([attribute] &amp;gt; 0.85 and [attribute] &amp;lt; 0.98,'orange', if([attribute] &amp;gt; 0.98, 'red', 'white'))&lt;/P&gt;
&lt;P&gt;The first part of the function to color the cells orange is not working, I am only getting red color. I made some tests and basically Qlik is not taking into account my function when I write "AND".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does someone have any idea how to do it? Should be simple but I couldn't find an answer online.&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2023 19:29:26 GMT</pubDate>
    <dc:creator>qlik88</dc:creator>
    <dc:date>2023-03-01T19:29:26Z</dc:date>
    <item>
      <title>Background colorization using IF AND</title>
      <link>https://community.qlik.com/t5/QlikView/Background-colorization-using-IF-AND/m-p/2044075#M1222826</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am trying to write a function that would do background colorization, for example:&lt;/P&gt;
&lt;P&gt;1. If the attribute value is more than 0.98, color the cells red&lt;/P&gt;
&lt;P&gt;2. If the attribute value is more than 0.85 and less than 0.98, color the cells orange&lt;/P&gt;
&lt;P&gt;I wrote this:&lt;/P&gt;
&lt;P&gt;if([attribute] &amp;gt; 0.85 and [attribute] &amp;lt; 0.98,'orange', if([attribute] &amp;gt; 0.98, 'red', 'white'))&lt;/P&gt;
&lt;P&gt;The first part of the function to color the cells orange is not working, I am only getting red color. I made some tests and basically Qlik is not taking into account my function when I write "AND".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does someone have any idea how to do it? Should be simple but I couldn't find an answer online.&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 19:29:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Background-colorization-using-IF-AND/m-p/2044075#M1222826</guid>
      <dc:creator>qlik88</dc:creator>
      <dc:date>2023-03-01T19:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Background colorization using IF AND</title>
      <link>https://community.qlik.com/t5/QlikView/Background-colorization-using-IF-AND/m-p/2044345#M1222836</link>
      <description>&lt;DIV class="w-full border-b border-black/10 dark:border-gray-900/50 text-gray-800 dark:text-gray-100 group bg-gray-50 dark:bg-[#444654]"&gt;
&lt;DIV class="text-base gap-4 md:gap-6 m-auto md:max-w-2xl lg:max-w-2xl xl:max-w-3xl p-4 md:py-6 flex lg:px-0"&gt;
&lt;DIV class="relative flex w-[calc(100%-50px)] flex-col gap-1 md:gap-3 lg:w-[calc(100%-115px)]"&gt;
&lt;DIV class="flex flex-grow flex-col gap-3"&gt;
&lt;DIV class="min-h-[20px] flex flex-col items-start gap-4 whitespace-pre-wrap"&gt;
&lt;DIV class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;P&gt;It seems that the issue may be related to the syntax used in your function. In Qlik, the correct syntax for using the logical operator AND is to use the symbol "&amp;amp;" instead of "and".&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;A href="https://www.homebargainsportal.net/" target="_self"&gt;&lt;FONT size="2" color="#FFFFFF"&gt;HomeBargains.co.uk&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Try updating your function to the following:&lt;/P&gt;
&lt;P&gt;if([attribute] &amp;gt; 0.85 &amp;amp; [attribute] &amp;lt; 0.98,'orange', if([attribute] &amp;gt; 0.98, 'red', 'white'))&lt;/P&gt;
&lt;P&gt;This should properly evaluate the logical operator AND and apply the orange color to cells where the attribute value is between 0.85 and 0.98.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="flex justify-between"&gt;
&lt;DIV class="text-gray-400 flex self-end lg:self-center justify-center mt-2 gap-3 md:gap-4 lg:gap-1 lg:absolute lg:top-0 lg:translate-x-full lg:right-0 lg:mt-0 lg:pl-2 visible"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Mar 2023 04:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Background-colorization-using-IF-AND/m-p/2044345#M1222836</guid>
      <dc:creator>sarafoster</dc:creator>
      <dc:date>2023-03-03T04:58:50Z</dc:date>
    </item>
  </channel>
</rss>

