<?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: getting wrong count result when using key field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587575#M1095799</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;counting keyfields is not a good idea, load the keyfield twice and give an Aliasname and cout this one.&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;key,&lt;/P&gt;&lt;P&gt;key as test&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 May 2014 11:09:05 GMT</pubDate>
    <dc:creator>lukaspuschner</dc:creator>
    <dc:date>2014-05-02T11:09:05Z</dc:date>
    <item>
      <title>getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587574#M1095797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am geting wrong count value when i use the key field in the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To give the background information, the key field is linking to multiple tables in my data model. Like the picture below.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="linkkk.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/58298_linkkk.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I am thinking to create a link table. Will this solve the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 11:07:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587574#M1095797</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2014-05-02T11:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587575#M1095799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;counting keyfields is not a good idea, load the keyfield twice and give an Aliasname and cout this one.&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;key,&lt;/P&gt;&lt;P&gt;key as test&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 11:09:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587575#M1095799</guid>
      <dc:creator>lukaspuschner</dc:creator>
      <dc:date>2014-05-02T11:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587576#M1095801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suraj,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the key field is unique in nature.? are you doing distinct count?&amp;nbsp; any set analysis ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For more understanding share you expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 11:10:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587576#M1095801</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2014-05-02T11:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587577#M1095803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you checked the information density and subset ratio of the key field across all the tables.&lt;/P&gt;&lt;P&gt;It may happen that after making the association few values might have added from other tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 11:14:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587577#M1095803</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2014-05-02T11:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587578#M1095804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use Count(Distinct Key)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 11:16:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587578#M1095804</guid>
      <dc:creator />
      <dc:date>2014-05-02T11:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587579#M1095805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sushil,&lt;/P&gt;&lt;P&gt;I am using the below expression. When i aliase the 'booking' key field it is giving the right count result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Count({&amp;lt;TransactionType={'Registration'}&amp;gt;} Booking)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since this key field is used in multiple tables, Do i need to aliase this field in every table, whenever i am using filter field from that table in set analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Sudeep- The information is 100% in all tables for that field, but subset ratio is less ie 98%, 99.97% etc in few tables(where this key field is present). What shall i do to the key field when subset ratio is less in that table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 11:22:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587579#M1095805</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2014-05-02T11:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587580#M1095806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Count(&amp;lt;field&amp;gt;) function counts the &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;number of records&lt;/EM&gt;&lt;/SPAN&gt; in the table where &amp;lt;field&amp;gt; exists (and &amp;lt;field&amp;gt; isn't NULL). But if you use a key field as parameter, the above definition is ambiguous - the field exists in more than one table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most likely you want to count the number of field values, and then you should use Count(distinct ...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 11:24:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587580#M1095806</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-05-02T11:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587581#M1095807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Henric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since my key field is present in multiple tables, so do i need to aliase this field in every table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 11:32:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587581#M1095807</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2014-05-02T11:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587582#M1095808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i think so&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 11:33:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587582#M1095808</guid>
      <dc:creator>lukaspuschner</dc:creator>
      <dc:date>2014-05-02T11:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587583#M1095809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;what&lt;/EM&gt;&lt;/SPAN&gt; you want to count.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, if the data model is OK, you should &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;not&lt;/EM&gt;&lt;/SPAN&gt; change the name of any key field. What you could do, is to make a copy of the key in the table where you want to count the records, and have an alias for this field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But since it is a key field, I assume that you want to count the number of distinct values? Or? And then you should use Count(distinct ...) to get the correct number of Bookings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I hope you are not avoiding Count(distinct) because of performance reasons? If so, read this: &lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct" title="http://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct"&gt;http://community.qlik.com/blogs/qlikviewdesignblog/2013/10/22/a-myth-about-countdistinct&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 11:42:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587583#M1095809</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-05-02T11:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: getting wrong count result when using key field</title>
      <link>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587584#M1095810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the inputs..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 12:18:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/getting-wrong-count-result-when-using-key-field/m-p/587584#M1095810</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2014-05-02T12:18:28Z</dc:date>
    </item>
  </channel>
</rss>

