<?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 How to get different background colours using a calculated expression? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232562#M84164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The given expression is working for you? Can you post the nested ifs expression?&lt;/P&gt;&lt;P&gt;I just whipped up an example with nested ifs and this worked in a sample app:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=if(Sum(TOTAL &amp;lt;Customer&amp;gt; Sales)&amp;gt;75, rgb(255,0,0),&lt;BR /&gt;if(Sum(TOTAL &amp;lt;Customer&amp;gt; Sales)&amp;gt;50, rgb(0,255,0)))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 May 2010 16:28:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-05T16:28:28Z</dc:date>
    <item>
      <title>How to get different background colours using a calculated expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232561#M84163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attempting to make the background of a 'text in chart' expression different colours dependent on the value of a calculated expression i.e. Value is 1 - background colour is Blue, Value is 2 - background colour is Green, Value is 3 - background colour is Orange, Value is 4 - background colour is Red.&lt;/P&gt;&lt;P&gt;Using an 'if' function I can get it to work for 2 values/colours but cannot work out how to use an 'if' function for all four (nested if's don't seem to work unless I have the syntax incorrect)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(firstsortedvalue([GRADE],-[Date])=3,RGB(73,133,222),RGB(0,240,120))&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;There doesn't appear to be a CASE function so if anyone could offer me advice as to how I could achieve I would be most grateful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 16:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232561#M84163</guid>
      <dc:creator />
      <dc:date>2010-05-05T16:19:31Z</dc:date>
    </item>
    <item>
      <title>How to get different background colours using a calculated expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232562#M84164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The given expression is working for you? Can you post the nested ifs expression?&lt;/P&gt;&lt;P&gt;I just whipped up an example with nested ifs and this worked in a sample app:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=if(Sum(TOTAL &amp;lt;Customer&amp;gt; Sales)&amp;gt;75, rgb(255,0,0),&lt;BR /&gt;if(Sum(TOTAL &amp;lt;Customer&amp;gt; Sales)&amp;gt;50, rgb(0,255,0)))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 16:28:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232562#M84164</guid>
      <dc:creator />
      <dc:date>2010-05-05T16:28:28Z</dc:date>
    </item>
    <item>
      <title>How to get different background colours using a calculated expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232563#M84165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of providing a RGB value in the True and False parts of the if you can also just create another if. Keep track of the brackets!&lt;/P&gt;&lt;P&gt;if ( A = 1, 1, if (A = 2, 2))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 16:30:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232563#M84165</guid>
      <dc:creator />
      <dc:date>2010-05-05T16:30:28Z</dc:date>
    </item>
    <item>
      <title>Re. :How to get different background colours using a calculated expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232564#M84166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;You have to imbricate your conditions :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;if (Condition1,Color if it's true, if(Condition2, color if it's true, if(Condition3, color if it's true, color if it's neither Condition1 nor Condition2 nor Condition3)))&lt;BR /&gt;Martin&amp;lt;/body&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 16:31:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232564#M84166</guid>
      <dc:creator>martin59</dc:creator>
      <dc:date>2010-05-05T16:31:02Z</dc:date>
    </item>
    <item>
      <title>How to get different background colours using a calculated expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232565#M84167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this for the Calculated expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Value = 1, rgb(0,0,255), if(Value = 2, rgb(0,255,0), if(Value = 3, rgb(255,150,0), if(Value = 4, rgb(255,0,0)))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if it works!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 18:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232565#M84167</guid>
      <dc:creator>boorgura</dc:creator>
      <dc:date>2010-05-05T18:35:30Z</dc:date>
    </item>
    <item>
      <title>How to get different background colours using a calculated expression?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232566#M84168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;Thanks for all the solutions offered, they all work!&lt;/P&gt;&lt;P&gt;I tried this originally but must of mistyped somewhere.&lt;/P&gt;&lt;P&gt;I have to say that I use a number of forums for various things and this forum is the best I have used, thanks to everyone for the help.&lt;/P&gt;&lt;P&gt;Cameron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 08:37:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-different-background-colours-using-a-calculated/m-p/232566#M84168</guid>
      <dc:creator />
      <dc:date>2010-05-06T08:37:07Z</dc:date>
    </item>
  </channel>
</rss>

