<?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: Re: Bar chart color not correct in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732127#M262192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use variables and assign the calculated values in your chart.&lt;/P&gt;&lt;P&gt;For your reference please find attachment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Jul 2014 09:01:04 GMT</pubDate>
    <dc:creator>jsingh71</dc:creator>
    <dc:date>2014-07-08T09:01:04Z</dc:date>
    <item>
      <title>Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732123#M262188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello to all the community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to color the bars of a bar chart depending on the values that the bars have, like on the example in attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a condition on the background color property of the chart. This condition is an if statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if([NumeroIncidenciasMPV]=max(NumeroIncidenciasMaximoMPV,1),Lightred(),Lightgreen())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is suppose to paint the largest bar with red.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But with this condition all the bars are painted red, but if I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if([NumeroIncidenciasMPV]=4,Lightred(),Lightgreen())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;only the first one is red, and this is what I need, but I need the value to be dynamic, so I have to use the expression max(NumeroIncidenciasMaximoMPV,1) or a variable containing its value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the value of max(NumeroIncidenciasMaximoMPV,1) and it is 4, so I don't understand why this is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 08:41:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732123#M262188</guid>
      <dc:creator />
      <dc:date>2014-07-08T08:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732124#M262189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF(Rank(SUM{1}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;NumeroIncidenciasMPV&lt;/SPAN&gt;)) = 1, Lightred(), LightGreen())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 08:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732124#M262189</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-07-08T08:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732125#M262190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works, but only for the first bar. What if I want to make something like on the new attachment?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Example.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61908_Example.png" style="width: 620px; height: 169px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 08:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732125#M262190</guid>
      <dc:creator />
      <dc:date>2014-07-08T08:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732126#M262191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;IF(Rank(SUM{1}&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;NumeroIncidenciasMPV&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;),4) = 1, Lightred(), LightGreen())&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 08:58:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732126#M262191</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-07-08T08:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732127#M262192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use variables and assign the calculated values in your chart.&lt;/P&gt;&lt;P&gt;For your reference please find attachment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 09:01:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732127#M262192</guid>
      <dc:creator>jsingh71</dc:creator>
      <dc:date>2014-07-08T09:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732128#M262193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That statement colors the bars one by one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to color all the bars with the same result with the same color, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the bars with result=4 with red, all the bars with result=3 yellow and so fort.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 09:06:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732128#M262193</guid>
      <dc:creator />
      <dc:date>2014-07-08T09:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732129#M262194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Ivo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solved problem, please check attached screenshot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Bar-Color-Change.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61912_Bar-Color-Change.png" style="width: 620px; height: 361px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Ishfaque Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 09:12:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732129#M262194</guid>
      <dc:creator>engishfaque</dc:creator>
      <dc:date>2014-07-08T09:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732130#M262195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ishfaque,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider this, what if the value 27 comes from a variable and this variable contains a dynamic value that comes from an expression, for example a max(FIELD) expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because I tried to do this (with the variable) and does not work, all the bars are painted the same color.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 09:46:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732130#M262195</guid>
      <dc:creator />
      <dc:date>2014-07-08T09:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732131#M262196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Ivo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find attached screenshots.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61924_1.png" style="width: 620px; height: 361px;" /&gt;&lt;IMG alt="2.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61928_2.png" style="width: 620px; height: 361px;" /&gt;&lt;IMG alt="3.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61930_3.png" style="width: 620px; height: 361px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Ishfaque Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 10:15:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732131#M262196</guid>
      <dc:creator>engishfaque</dc:creator>
      <dc:date>2014-07-08T10:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732132#M262197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the reply Ishfaque,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I follow all the step you showed me, the only difference is that you set the value 27 to the variable and I set the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;max(NumeroIncidencias)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and with this all the bars are colored red... I have a textfield on the side of the chart to check the value of my $(maximoIncidencaisMPVA) and the value is 4.00000000... Could this influence the if statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="A.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61934_A.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="B.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61935_B.png" style="width: 620px; height: 461px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="C.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/61936_C.png" style="width: 620px; height: 132px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 10:30:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732132#M262197</guid>
      <dc:creator />
      <dc:date>2014-07-08T10:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart color not correct</title>
      <link>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732133#M262198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Ivo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These screenshots will help you, please find attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Expression-1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/62010_Expression-1.png" style="max-width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Expression-2.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/62011_Expression-2.png" style="width: 620px; height: 388px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Expression-Result.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/62015_Expression-Result.png" style="width: 620px; height: 361px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Moreover,&lt;/STRONG&gt; you can do it by using following expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Background Color &amp;gt; Defination &amp;gt; =If(Max(your_field_name), RGB(0,255,0))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Ishfaque Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2014 07:53:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Bar-chart-color-not-correct/m-p/732133#M262198</guid>
      <dc:creator>engishfaque</dc:creator>
      <dc:date>2014-07-09T07:53:21Z</dc:date>
    </item>
  </channel>
</rss>

