<?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 Counting cells in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218195#M71360</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's define the green as the number of progression between 2 years&lt;/P&gt;&lt;P&gt;Create in the script a new variable if( previous ( Metric ) &amp;lt; Metric , 1 , 0) as Green&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in a chart by region, plant , just use sum(Green)&lt;/P&gt;&lt;P&gt;For the red, add a new expression ; count( Metric) - sum(Green) - 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2010 22:51:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-12-10T22:51:00Z</dc:date>
    <item>
      <title>Counting cells</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218189#M71354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the sample inline load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Reg, Plname, Year,2G%, 3G%&lt;BR /&gt;AB, Plt1,2008,12.3,14.5&lt;BR /&gt;AB, Plt1,2009,12.6,14.3&lt;BR /&gt;AB, Plt1,2010,12.4,14.9&lt;BR /&gt;AB, Plt2,2008,23.3,32.5&lt;BR /&gt;AB, Plt2,2009,22.9,34.5&lt;BR /&gt;AB, Plt2,2010,22.5,54.5&lt;BR /&gt;BC, Plt3,2008,13.3,14.5&lt;BR /&gt;BC, Plt3,2009,17.6,14.3&lt;BR /&gt;BC, Plt3,2010,19.4,14.9&lt;BR /&gt;BC, Plt4,2008,73.3,12.5&lt;BR /&gt;BC, Plt4,2009,42.9,43.5&lt;BR /&gt;BC, Plt4,2010,45.5,45.5&lt;BR /&gt;CD, Plt5,2008,62.3,24.5&lt;BR /&gt;CD, Plt5,2009,15.6,64.3&lt;BR /&gt;CD, Plt5,2010,62.4,34.9&lt;BR /&gt;CD, Plt6,2008,33.3,52.5&lt;BR /&gt;CD, Plt6,2009,12.9,74.5&lt;BR /&gt;CD, Plt6,2010,32.5,54.5&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;I have expressions for background colors for last 2 which are expressions fields. Now I want to count the number of reds and greens based on each region/plant/year.Based on that I have some expressions to calculate some values and show them for each region for that year. Please let me know how to count them, may be store in a variable and use in another graph or table.&lt;/P&gt;&lt;P&gt;And also, say for example a value for 2008 is null then next value for 2009 is turning green. How can I have it white till it has a prior value for comparision? Right now Im using this for b/g color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(rowno()=1,null(),if(above([2G%])&amp;lt;[2G%],lightred(),lightgreen()))&lt;/P&gt;&lt;P&gt;Please let me know if you have any questions. &lt;IMG border="0" src="https://community.qlik.com/../resized-image.ashx/__size/550x500/__key/CommunityServer.Discussions.Components.Files/11/8203.bmp.bmp" /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 20:36:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218189#M71354</guid>
      <dc:creator />
      <dc:date>2010-12-08T20:36:41Z</dc:date>
    </item>
    <item>
      <title>Counting cells</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218190#M71355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone reply to this please?&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, 08 Dec 2010 23:25:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218190#M71355</guid>
      <dc:creator />
      <dc:date>2010-12-08T23:25:50Z</dc:date>
    </item>
    <item>
      <title>Counting cells</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218191#M71356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone help on this pleaseee?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 17:31:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218191#M71356</guid>
      <dc:creator />
      <dc:date>2010-12-09T17:31:40Z</dc:date>
    </item>
    <item>
      <title>Counting cells</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218192#M71357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;if(&lt;BR /&gt;rowno()=1,null()&lt;BR /&gt;,if(len(above([2G%]))=0, white()&lt;BR /&gt;,if(above([2G%])&amp;lt;[2G%],lightred(),lightgreen()&lt;BR /&gt;)))&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 21:45:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218192#M71357</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-12-09T21:45:03Z</dc:date>
    </item>
    <item>
      <title>Counting cells</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218193#M71358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai rob, Is there a way I can count the number of greens and number of reds for each metric?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 21:39:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218193#M71358</guid>
      <dc:creator />
      <dc:date>2010-12-10T21:39:12Z</dc:date>
    </item>
    <item>
      <title>Counting cells</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218194#M71359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not very clear&lt;/P&gt;&lt;P&gt;Can you explain the expressions to set the color. How do you define a red ? a green ?&lt;/P&gt;&lt;P&gt;JJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 22:27:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218194#M71359</guid>
      <dc:creator />
      <dc:date>2010-12-10T22:27:17Z</dc:date>
    </item>
    <item>
      <title>Counting cells</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218195#M71360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's define the green as the number of progression between 2 years&lt;/P&gt;&lt;P&gt;Create in the script a new variable if( previous ( Metric ) &amp;lt; Metric , 1 , 0) as Green&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in a chart by region, plant , just use sum(Green)&lt;/P&gt;&lt;P&gt;For the red, add a new expression ; count( Metric) - sum(Green) - 1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 22:51:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218195#M71360</guid>
      <dc:creator />
      <dc:date>2010-12-10T22:51:00Z</dc:date>
    </item>
    <item>
      <title>Counting cells</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218196#M71361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To take account the break of plant :&lt;/P&gt;&lt;P&gt;if( previous(Plname)&amp;lt;&amp;gt; Plname , Null() , if( previous (Metric ) &amp;lt; Metric , 1 , 0)) as Green&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 22:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218196#M71361</guid>
      <dc:creator />
      <dc:date>2010-12-10T22:56:13Z</dc:date>
    </item>
    <item>
      <title>Counting cells</title>
      <link>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218197#M71362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai Jean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the reply. this previous function is giving me error in expression..!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Dec 2010 18:16:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Counting-cells/m-p/218197#M71362</guid>
      <dc:creator />
      <dc:date>2010-12-13T18:16:11Z</dc:date>
    </item>
  </channel>
</rss>

