<?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: count function in graphs in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-function-in-graphs/m-p/865833#M656596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martijn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you said, the 1st formula should be:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Pending Trades / &lt;STRONG&gt;Total&lt;/STRONG&gt; Trades&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Then, the expression should follow:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;=COUNT( {$&amp;lt;[ESMA Match Status]={"PENDING"}&amp;gt;}&amp;nbsp; DISTINCT [Trade ID] ) / COUNT( DISTINCT &lt;STRONG&gt;TOTAL&lt;/STRONG&gt; [Trade ID] )&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same with the 2nd:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Category 2 Mismatch / &lt;STRONG&gt;Total&lt;/STRONG&gt; Trades&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Should be:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;=COUNT( {$&amp;lt;[ESMA Match Status]={"UNMATCHED2"}&amp;gt; }&amp;nbsp; DISTINCT [Trade ID] ) / COUNT ( DISTINCT &lt;STRONG&gt;TOTAL&lt;/STRONG&gt; [Trade ID] )&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: Tahoma; font-size: 8pt;"&gt;&lt;SPAN dir="ltr" style="font-size: 13px;"&gt;Hope helps,&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG&gt;David Sugito &lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt;Mobile: + 62 878 0888 9871&lt;BR /&gt;Phone: + 62 21 569 823 85 / 86&lt;BR /&gt;Email: &lt;A class="jive-link-email-small" href="mailto:me@davidshuang.com"&gt;me@davidshuang.com&lt;/A&gt;&lt;BR /&gt;Site: davidshuang.com&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jun 2015 14:54:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-10T14:54:28Z</dc:date>
    <item>
      <title>count function in graphs</title>
      <link>https://community.qlik.com/t5/QlikView/count-function-in-graphs/m-p/865831#M656594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using count functions to display ratios in a dashboard. The expressions seem to be ok, but when I click on a certain value, 1 meter should display a ratio of 1 whereas all others should by definition be zero. The fields that I use for the ratios are called [Trade ID] and [ESMA Match Status].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Taking these two ratios and selecting only those trades that are Pending, I still get a ratio that is larger than 0 for the category 2 mismatch ratio. This should be impossible by definition, since I selected the positions for which ESMA Match Status was equal to "PENDING". Please see the ratios and their respective expressions below.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pending Trades/Total Trades&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Category 2 Mismatch/Total Trades&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are my definitions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pending Trades ratio:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;[ESMA Match Status]={"PENDING"}&amp;gt;}&amp;nbsp; distinct [Trade ID])/count(distinct([Trade ID]))&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Category 2 mismatch ratio:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({$&amp;lt;[ESMA Match Status]={"UNMATCHED2"}&amp;gt;}&amp;nbsp; distinct [Trade ID])/count(distinct([Trade ID]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anybody assist in finding the cause of this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 13:55:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-function-in-graphs/m-p/865831#M656594</guid>
      <dc:creator />
      <dc:date>2015-06-10T13:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: count function in graphs</title>
      <link>https://community.qlik.com/t5/QlikView/count-function-in-graphs/m-p/865832#M656595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try using&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count(distinct(total [Trade ID]) as denominator&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 14:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-function-in-graphs/m-p/865832#M656595</guid>
      <dc:creator>santhoo_san</dc:creator>
      <dc:date>2015-06-10T14:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: count function in graphs</title>
      <link>https://community.qlik.com/t5/QlikView/count-function-in-graphs/m-p/865833#M656596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martijn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you said, the 1st formula should be:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Pending Trades / &lt;STRONG&gt;Total&lt;/STRONG&gt; Trades&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Then, the expression should follow:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;=COUNT( {$&amp;lt;[ESMA Match Status]={"PENDING"}&amp;gt;}&amp;nbsp; DISTINCT [Trade ID] ) / COUNT( DISTINCT &lt;STRONG&gt;TOTAL&lt;/STRONG&gt; [Trade ID] )&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same with the 2nd:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Category 2 Mismatch / &lt;STRONG&gt;Total&lt;/STRONG&gt; Trades&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Should be:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;=COUNT( {$&amp;lt;[ESMA Match Status]={"UNMATCHED2"}&amp;gt; }&amp;nbsp; DISTINCT [Trade ID] ) / COUNT ( DISTINCT &lt;STRONG&gt;TOTAL&lt;/STRONG&gt; [Trade ID] )&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: Tahoma; font-size: 8pt;"&gt;&lt;SPAN dir="ltr" style="font-size: 13px;"&gt;Hope helps,&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;STRONG&gt;David Sugito &lt;/STRONG&gt;&lt;BR /&gt; &lt;BR /&gt;Mobile: + 62 878 0888 9871&lt;BR /&gt;Phone: + 62 21 569 823 85 / 86&lt;BR /&gt;Email: &lt;A class="jive-link-email-small" href="mailto:me@davidshuang.com"&gt;me@davidshuang.com&lt;/A&gt;&lt;BR /&gt;Site: davidshuang.com&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 14:54:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-function-in-graphs/m-p/865833#M656596</guid>
      <dc:creator />
      <dc:date>2015-06-10T14:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: count function in graphs</title>
      <link>https://community.qlik.com/t5/QlikView/count-function-in-graphs/m-p/865834#M656597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem does not seem to be caused by the expression in the denominator; adding total does not yield a difference in trade count. Regardless of the value of the denominator (unless it's zero), the ratio should be zero for the value "UNMATCHED2" when I select "PENDING", since the count in the numerator should then by definition be zero, since a trade cannot be pending and unmatched2 at the same time. I just do not see how I can make a selection that rules out the other value, but the expression still results in a positive count of that value...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2015 16:14:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-function-in-graphs/m-p/865834#M656597</guid>
      <dc:creator />
      <dc:date>2015-06-10T16:14:13Z</dc:date>
    </item>
  </channel>
</rss>

