<?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: if source count is less than 2, highlight red in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-source-count-is-less-than-2-highlight-red/m-p/1006487#M951582</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Count(Source) and Count(DISTINCT Source) are two different things... Do you want just the count for each Destination1 or the DISTINCT count?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I don't think you need to use Aggregate function if you only have Destination1 as your dimension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Count(Source) &amp;lt; 2, Red(), Green()) &lt;/STRONG&gt;//use DISTINCT if required&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Nov 2015 12:14:10 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-11-30T12:14:10Z</dc:date>
    <item>
      <title>if source count is less than 2, highlight red</title>
      <link>https://community.qlik.com/t5/QlikView/if-source-count-is-less-than-2-highlight-red/m-p/1006485#M951580</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;Dimension: Place1&lt;/P&gt;&lt;P&gt;Expression: &lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Source&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),Place1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use this equations in my chart, for the background part of my expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Source&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;lt; 2),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Place1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RGB&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(255,66,66),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Source&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Place1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I want the cells for 'Source' to have a red background when the count(Source) is less than 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;The above equation won't work, everything is highlighted red.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;how do I fix this?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 12:10:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-source-count-is-less-than-2-highlight-red/m-p/1006485#M951580</guid>
      <dc:creator>stjernvd</dc:creator>
      <dc:date>2015-11-30T12:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: if source count is less than 2, highlight red</title>
      <link>https://community.qlik.com/t5/QlikView/if-source-count-is-less-than-2-highlight-red/m-p/1006486#M951581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=IF(Count(&amp;lt;Total Destination1&amp;gt; Distinct Source)&amp;gt;2, &lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;RGB&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(255,66,66), &lt;SPAN style="font-size: 13.3333px;"&gt;Count(&amp;lt;Total Destination1&amp;gt; Distinct Source))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 12:13:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-source-count-is-less-than-2-highlight-red/m-p/1006486#M951581</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-30T12:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: if source count is less than 2, highlight red</title>
      <link>https://community.qlik.com/t5/QlikView/if-source-count-is-less-than-2-highlight-red/m-p/1006487#M951582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Count(Source) and Count(DISTINCT Source) are two different things... Do you want just the count for each Destination1 or the DISTINCT count?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I don't think you need to use Aggregate function if you only have Destination1 as your dimension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=If(Count(Source) &amp;lt; 2, Red(), Green()) &lt;/STRONG&gt;//use DISTINCT if required&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Nov 2015 12:14:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-source-count-is-less-than-2-highlight-red/m-p/1006487#M951582</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-11-30T12:14:10Z</dc:date>
    </item>
  </channel>
</rss>

