<?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: Conditional Count (with Color) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569612#M1112332</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can pre-calc the bucket in the script or create it as a Calculated Dim in your chart like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if([Age (Days)] &amp;gt; 90, '&amp;gt;90'&lt;/P&gt;&lt;P&gt;,if([Age (Days)] &amp;gt; 30, '30-90'&lt;/P&gt;&lt;P&gt;,'&amp;lt;30'&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assigned the colors in the pallate order. If you want to get more specific you can use the background color attribute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I think your set modifier shoule be:&lt;/P&gt;&lt;P&gt;Status-={'Closed'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Feb 2014 01:19:46 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2014-02-26T01:19:46Z</dc:date>
    <item>
      <title>Conditional Count (with Color)</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569611#M1112331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a stacked bar chart that displays all open CAPA records by Division (the dimension). I also want each bar to reflect subsets of age ranges for the open records (&amp;lt;30, Between 30 &amp;amp; 90 and &amp;gt;90 days) showing as green, yellow and red,respectively.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have a set analysis that filters out all of the "non-closed" records (Count({$&amp;lt;&lt;SPAN style="color: #800000;"&gt;Status&lt;/SPAN&gt;=&lt;SPAN style="color: #800000;"&gt;Status&lt;/SPAN&gt;-{'Closed'}&amp;gt;} &lt;SPAN style="color: #800000;"&gt;[CAPA No]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)) as an expression, however I have not been able to figure out how to count the open records for each site based on each "Age (Days)" range so I can see for each division a bar stacked with green, yellow and red bands, as applicable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Jeff&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 00:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569611#M1112331</guid>
      <dc:creator>jmonroe918</dc:creator>
      <dc:date>2014-02-26T00:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Count (with Color)</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569612#M1112332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can pre-calc the bucket in the script or create it as a Calculated Dim in your chart like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if([Age (Days)] &amp;gt; 90, '&amp;gt;90'&lt;/P&gt;&lt;P&gt;,if([Age (Days)] &amp;gt; 30, '30-90'&lt;/P&gt;&lt;P&gt;,'&amp;lt;30'&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assigned the colors in the pallate order. If you want to get more specific you can use the background color attribute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I think your set modifier shoule be:&lt;/P&gt;&lt;P&gt;Status-={'Closed'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 01:19:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569612#M1112332</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-02-26T01:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Count (with Color)</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569613#M1112333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeffrey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check my attached file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sokkorn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 01:24:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569613#M1112333</guid>
      <dc:creator>Sokkorn</dc:creator>
      <dc:date>2014-02-26T01:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Count (with Color)</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569614#M1112334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the solution. I tried to use the Background Color attribute with both statements you see below, but neither worked. I tried them in both the Dimension at the calculation and at the expression. Are they incorrect?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Age (Days)]&lt;/SPAN&gt; = '&amp;lt;30', &lt;SPAN style="color: #0000ff;"&gt;green&lt;/SPAN&gt;(),&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Age (Days)]&lt;/SPAN&gt; = '&amp;gt;90', &lt;SPAN style="color: #0000ff;"&gt;red&lt;/SPAN&gt;(),&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;yellow&lt;/SPAN&gt;()&lt;BR /&gt;)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Age (Days)]&lt;/SPAN&gt; &amp;lt;30, &lt;SPAN style="color: #0000ff;"&gt;green&lt;/SPAN&gt;(),&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[Age (Days)]&lt;/SPAN&gt;&amp;nbsp; &amp;gt;90, &lt;SPAN style="color: #0000ff;"&gt;red&lt;/SPAN&gt;(),&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;yellow&lt;/SPAN&gt;()&lt;BR /&gt;)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 06:21:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569614#M1112334</guid>
      <dc:creator>jmonroe918</dc:creator>
      <dc:date>2014-02-26T06:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Count (with Color)</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569615#M1112335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sokkorn:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, too for the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 06:22:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569615#M1112335</guid>
      <dc:creator>jmonroe918</dc:creator>
      <dc:date>2014-02-26T06:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Conditional Count (with Color)</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569616#M1112336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Background Color attribute belongs in the expression. Because you are in an aggregation, you need to include an aggregation function like avg in the test:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=if(&lt;STRONG&gt;avg&lt;/STRONG&gt;([Age (Days)]) &amp;gt; 90, red()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;,if(&lt;STRONG&gt;avg&lt;/STRONG&gt;([Age (Days)]) &amp;gt; 30, yellow()&lt;/P&gt;&lt;P&gt;,green()&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 19:49:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569616#M1112336</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-02-26T19:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Conditional Count (with Color)</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569617#M1112337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again. Makes sense. I also used the "rgb()" expression to get the red, green and yellow I wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Feb 2014 20:13:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-Count-with-Color/m-p/569617#M1112337</guid>
      <dc:creator>jmonroe918</dc:creator>
      <dc:date>2014-02-26T20:13:57Z</dc:date>
    </item>
  </channel>
</rss>

