<?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 graph in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300973#M616002</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kushal, this worked perfectly &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jun 2017 11:58:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-06-16T11:58:28Z</dc:date>
    <item>
      <title>Count function in graph</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300970#M615999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used an expression in a graph as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;[Tijdigheid]={'Op tijd'}&amp;gt;} DISTINCT [Transaction No.]) /count([Transaction No.])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It counts transactions that were booked on time and divides them by the total transactions to derive a percentage. I used portfolio as a dimension. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seemed to be working fine, but when I selected 'Te laat' (Too late) from the Field 'Tijdigheid' (timeliness), the percentages of timely booked transactions spike. I would expect that when only 'Too late' Transactions are selected, the percentage of timely booked transactions would be zero, since only 'Too late' booked transactions are selected. However, the function &lt;SPAN style="font-size: 13.3333px;"&gt;count([Transaction No.], counts only those transactions that are selected (the transactions that are too late), where as &lt;SPAN style="font-size: 13.3333px;"&gt;Count({&amp;lt;[Tijdigheid]={'Op tijd'}&amp;gt;} DISTINCT [Transaction No.]), counts all timely booked transactions within the portfolio, no matter the selection in the field 'Tijdigheid'. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;This is not necessarily a problem, since the main objective of this graph is to present the percentage of timely booked transactions. However, I am looking for an explanation, because I fail to understand why the part of the function in the numerator of my function does not change based on the selection, where as the result of the function in the denominator does change. Can anyone please explain this to me?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 10:06:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300970#M615999</guid>
      <dc:creator />
      <dc:date>2017-06-16T10:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in graph</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300971#M616000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason that the numbers changed is that the selection you made impacts the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count([Transaction No.]) that you are dividing with. If you use set analysis in this one to (i.e. count({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Tijdigheid] = &lt;/SPAN&gt;&amp;gt;} [Transaction No.]) it should stay the same.&lt;/SPAN&gt;&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;&lt;BR /&gt;&lt;/SPAN&gt;&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;Also, is it intentional to use count distinct in just one of the numbers but not the other? Seems like you are dividing apples with oranges like that.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 10:47:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300971#M616000</guid>
      <dc:creator>niclaz79</dc:creator>
      <dc:date>2017-06-16T10:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in graph</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300972#M616001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as you have used set analysis on timeliness field in Numerator, it will not change based on any other selection in that field, to do that use below expression&lt;/P&gt;&lt;P&gt;&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({&amp;lt;[Tijdigheid] &lt;STRONG&gt;*=&lt;/STRONG&gt;{'Op tijd'}&amp;gt;} DISTINCT [Transaction No.]) /count([Transaction No.])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 11:04:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300972#M616001</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2017-06-16T11:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in graph</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300973#M616002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kushal, this worked perfectly &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 11:58:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300973#M616002</guid>
      <dc:creator />
      <dc:date>2017-06-16T11:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Count function in graph</title>
      <link>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300974#M616003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Niclas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the advice! I should have left the 'distinct' out of the expression, since I used a script that only selects unique transaction numbers. So yes, it would be like dividing apples with oranges, but in this case it does not make any difference. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 09:56:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Count-function-in-graph/m-p/1300974#M616003</guid>
      <dc:creator />
      <dc:date>2017-06-19T09:56:52Z</dc:date>
    </item>
  </channel>
</rss>

