<?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: Need help with attribute chart expression (background color) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423384#M489355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK I see what you mean.&amp;nbsp; If I put = count(distinct monthyear) in a text box, I get 45 because there's no dimensional split, but in my bar chart I get 1 as you said because it's dividing the 45 by the # of dimension values in the chart - so 45 / 45 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Dec 2012 14:28:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-12T14:28:47Z</dc:date>
    <item>
      <title>Need help with attribute chart expression (background color)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423379#M489350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 18pt;"&gt;I would like to set background color in attribute chart expression of a bar chart so that bars where the expression value is less than the average monthly sales appear in red and the others appear in green.&amp;nbsp; If I arbitrarily hard code a threshold value like this it works: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 18pt;"&gt;if (sum(Sales)&amp;lt; 50000,red(),green()) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 18pt;"&gt;But this does not:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 18pt;"&gt;if (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 18pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 18pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 18pt;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 18pt;"&gt;)&amp;lt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 18pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 18pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 18pt;"&gt;Sales&lt;/SPAN&gt;&lt;SPAN style="font-size: 18pt;"&gt;)/ &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 18pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 18pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 18pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 18pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 18pt;"&gt;MonthYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 18pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 18pt;"&gt;red&lt;/SPAN&gt;&lt;SPAN style="font-size: 18pt;"&gt;(),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 18pt;"&gt;green&lt;/SPAN&gt;&lt;SPAN style="font-size: 18pt;"&gt;()) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 02:03:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423379#M489350</guid>
      <dc:creator />
      <dc:date>2012-12-11T02:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with attribute chart expression (background color)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423380#M489351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aea,&lt;/P&gt;&lt;P&gt;Sorry to say but you should take hard coated in this case as &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; count(distinct monthyear)=1 always,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and hence your condition is always equal&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(sales)=sum)sales)/count(distinct monthyear)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and hence coloring is not applied.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 04:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423380#M489351</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2012-12-11T04:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with attribute chart expression (background color)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423381#M489352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Son of Sardar - I don't understand.&amp;nbsp; If I put =count (distinct monthyear) in a Text Object, I see 45, not 1.&amp;nbsp; Can you clarify please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 11:12:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423381#M489352</guid>
      <dc:creator />
      <dc:date>2012-12-11T11:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with attribute chart expression (background color)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423382#M489353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok just put another expression in your chart as &lt;STRONG&gt;count(distinct monthyear)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And post it to meee&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 11:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423382#M489353</guid>
      <dc:creator>sujeetsingh</dc:creator>
      <dc:date>2012-12-11T11:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with attribute chart expression (background color)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423383#M489354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(rangemin(.5,rangemax(condition),-.5)) &amp;lt; 0, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Sqrt(-(rangemin(.5,rangemax(condition),-.5)))/(-.5)),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sqrt((rangemin(.5,rangemax(condition),-.5)))/(.5))), &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARGB(255, 255, 0, 0), ARGB(255, 0, 255, 0), ARGB(255, 255, 255, 255)) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2012 11:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423383#M489354</guid>
      <dc:creator />
      <dc:date>2012-12-11T11:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with attribute chart expression (background color)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423384#M489355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK I see what you mean.&amp;nbsp; If I put = count(distinct monthyear) in a text box, I get 45 because there's no dimensional split, but in my bar chart I get 1 as you said because it's dividing the 45 by the # of dimension values in the chart - so 45 / 45 = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 14:28:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423384#M489355</guid>
      <dc:creator />
      <dc:date>2012-12-12T14:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with attribute chart expression (background color)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423385#M489356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not necessary to hard code - just add a TOTAL modifier to the sum and count, like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(Total Sales) / count(DISTINCT Total MonthYear)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The total causes the dimensions to be ignored, so it will return the same value as the text box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 14:43:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423385#M489356</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-12-12T14:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with attribute chart expression (background color)</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423386#M489357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 14:52:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-with-attribute-chart-expression-background-color/m-p/423386#M489357</guid>
      <dc:creator />
      <dc:date>2012-12-12T14:52:03Z</dc:date>
    </item>
  </channel>
</rss>

