<?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: Issue with counts and filters in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381082#M511705</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for being ambiguous but I want it the other way round. I only want to see the&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;PBGA_MASTER_ID where&lt;UL&gt;&lt;LI&gt;count(VEHICLE_ID) is NULL&lt;/LI&gt;&lt;LI&gt;or&lt;/LI&gt;&lt;LI&gt;isnull(VEHICLE_ID)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to use it in a bar chart (you can see a more detailed explanation in my last reply to Sunny Talwar). But strangely the PBGA_MASTER_ID 11178 pretends to have no VEHICLE_ID linkages as soon as a filter is set while before setting a filter it had 212 VEHICLE_IDs..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Dec 2017 07:17:20 GMT</pubDate>
    <dc:creator>citizenk</dc:creator>
    <dc:date>2017-12-12T07:17:20Z</dc:date>
    <item>
      <title>Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381074#M511697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a statistic of linkages between IDs (PBGA_MASTER_ID) and vehicles (VEHICLE_ID) but at some point I lack understanding the relation between counts and set filters.e given below I want to have a summary of PBGA_MASTER_ID that are not having relation to a VEHICLE_ID (count&amp;lt;0 or NULL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/186421_1.png" style="height: 313px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case I have a calculation of the vehicle count which works fine for both variants (as given in the boxes on the right):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count(distinct VEHICLE_ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({1&amp;lt;PBGA_MASTER_ID=p(PBGA_MASTER_ID)&amp;gt;}distinct VEHICLE_ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the box statistic I try to show all PBGA_MASTER_ID without linkage to a VEHICLE_ID in a table (and later in a bar chart) aggregated over months. But when I am selecting a filter (green arrow)&amp;nbsp; the first count on the right side (mentioned above) drops to 0 and the second count remains since I am delimiting the considered filters to PBGA_MASTER_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Now I am struggling because I see the PBGA_MASTER_ID 11178 in the box statistic as having no vehicles linked by the expression:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if(IsNull(VEHICLE_ID) or count(VEHICLE_ID)&amp;lt;1,'No Vehicles')&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2.png" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/186437_2.png" style="height: 312px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am struggling because I see the PBGA_MASTER_ID 11178 in the box statistic as having no vehicles linked by the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(IsNull(VEHICLE_ID) or count(VEHICLE_ID)&amp;lt;1,'No Vehicles')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that &lt;SPAN style="font-size: 13.3333px;"&gt;somehow the calculation is affected by the filter but I need to know how to create an expression that covers all PBGA_MASTER_IDs with VEHICLE_ID either 0 or NULL but also regards the selected filters.&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;How can I make 11178 disappear from the box statistic by counting the VEHICLE_IDs correctly?&lt;BR /&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;All alternate States are set to &amp;lt;inherited&amp;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;Thanks in advance for any tips&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 12:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381074#M511697</guid>
      <dc:creator>citizenk</dc:creator>
      <dc:date>2017-12-11T12:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381075#M511698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to make 11178 disappear, why not use &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count(distinct VEHICLE_ID) which was working the way you want? I think I am missing something, right? Why do you need to use this? &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count({1&amp;lt;PBGA_MASTER_ID=p(PBGA_MASTER_ID)&amp;gt;}distinct VEHICLE_ID)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 16:26:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381075#M511698</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-12-11T16:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381076#M511699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you say, "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;How can I make 11178 disappear?", do you mean just the text at that particular cell of the table or the entire row? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 16:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381076#M511699</guid>
      <dc:creator>jonvitale</dc:creator>
      <dc:date>2017-12-11T16:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381077#M511700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count(distinct VEHICLE_ID) brings up that 11178 has&amp;nbsp; 0 VEHICLE_IDs linked as soon as the filter is set &lt;SPAN style="font-size: 13.3333px;"&gt;(second screenshot) &lt;/SPAN&gt;but this count is wrong.&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;I can only force the correct count of 212 VEHICLE_IDs by &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;count({1&amp;lt;PBGA_MASTER_ID=p(PBGA_MASTER_ID)&amp;gt;}distinct VEHICLE_ID) &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;but I need the correct count in the chart "statistics" which I don't get as soon as a filter is set. In the chart "statistics" I would expect it not to appear since I only want PBGA_MASTER_ID in there that really have no linkage to a VEHICLE_ID.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 18:07:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381077#M511700</guid>
      <dc:creator>citizenk</dc:creator>
      <dc:date>2017-12-11T18:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381078#M511701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The whole line since 11178 has vehicles and therefore it shouldn't appear. 212 is the correct count.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 18:08:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381078#M511701</guid>
      <dc:creator>citizenk</dc:creator>
      <dc:date>2017-12-11T18:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381079#M511702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if you do this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(IsNull(VEHICLE_ID) or Count({1&amp;lt;PBGA_MASTER_ID=p(PBGA_MASTER_ID)&amp;gt;} DISTINCT VEHICLE_ID) &amp;lt; 1, 'No Vehicles')&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 18:20:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381079#M511702</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-12-11T18:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381080#M511703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm still not quite sure what you need, but from what I can gather: &lt;SPAN style="font-size: 10pt;"&gt;you don't want to display rows on the table based upon some value (or lack thereof) of a measure calculated on the row's dimensional values. So, whenever, the measure is calculated to 0 (or null) you want to suppress the row of the table. Does this sound right?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;One thing you could do is create a calculated dimension using the AGGR function, which will produce Null in those cases where there are no "vehicles". Then unselect, "Include null values" from the options of the dimension (I use Qlik Sense, but I assume the options are the same).&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;So something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Aggr(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;if(IsNull(VEHICLE_ID) or count(VEHICLE_ID)&amp;lt;1,Null(), count(distinct VEHICLE_iD))&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PBGA_MASTER_ID)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;This will produce a column with the counts of distinct vehicle ids or Null if there aren't any. If it's a dimension, you can suppress nulls.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Let me know if it works.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jonathan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2017 18:57:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381080#M511703</guid>
      <dc:creator>jonvitale</dc:creator>
      <dc:date>2017-12-11T18:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381081#M511704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sadly no positive effect. Even if I try to cut the expression down to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(&lt;SPAN style="text-decoration: line-through;"&gt;IsNull(VEHICLE_ID&lt;/SPAN&gt;&lt;SPAN style="text-decoration: line-through;"&gt;) or&lt;/SPAN&gt; Count({1&amp;lt;PBGA_MASTER_ID=p(PBGA_MASTER_ID)&amp;gt;} DISTINCT VEHICLE_ID) &amp;lt; 1, 'No Vehicles')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11178 appears.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you have an idea and more insight if I explain what I finally want: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to have a bar chart that&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;aggregates the count of PBGA_MASTER_IDs without vehicle linkage&lt;/LI&gt;&lt;LI&gt;over months&lt;/LI&gt;&lt;LI&gt;regarding the filter set in the active sheet&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But since e.g. 11178 always appears which actually has vehicle linkages I failed by now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the following picture you can see my desired &lt;SPAN style="font-size: 13.3333px;"&gt;output but the only value for Feb 2016 is &lt;SPAN style="font-size: 13.3333px;"&gt;11178 which indeed has 212 vehicle linkages.&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;&lt;IMG alt="3.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/186553_3.png" style="height: 315px; width: 620px;" /&gt;&lt;BR /&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;Maybe we can alter your suggested expression to make it work.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 06:43:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381081#M511704</guid>
      <dc:creator>citizenk</dc:creator>
      <dc:date>2017-12-12T06:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381082#M511705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for being ambiguous but I want it the other way round. I only want to see the&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;PBGA_MASTER_ID where&lt;UL&gt;&lt;LI&gt;count(VEHICLE_ID) is NULL&lt;/LI&gt;&lt;LI&gt;or&lt;/LI&gt;&lt;LI&gt;isnull(VEHICLE_ID)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to use it in a bar chart (you can see a more detailed explanation in my last reply to Sunny Talwar). But strangely the PBGA_MASTER_ID 11178 pretends to have no VEHICLE_ID linkages as soon as a filter is set while before setting a filter it had 212 VEHICLE_IDs..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 07:17:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381082#M511705</guid>
      <dc:creator>citizenk</dc:creator>
      <dc:date>2017-12-12T07:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381083#M511706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for more information,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure that Sunny will give a non-AGGR response. But this might work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want an if-statement to determine if a master-id is linked to any vehicle ids. This aggr function will do that for each master_id.&lt;/P&gt;&lt;P&gt;Aggr(If (Count(distinct VEHICLE_ID) &amp;gt; 0, 1, 0), &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PBGA_MASTER_ID).&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-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;You need to wrap this virtual table from the Aggr function (master ids by distinct vehicle count) in an aggregation function, count.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;Count(&lt;SPAN style="font-size: 13.3333px;"&gt;Aggr(If (Count(distinct VEHICLE_ID) &amp;gt; 0, 1, 0), &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PBGA_MASTER_ID))&lt;/SPAN&gt;&lt;/STRONG&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;&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;(Note, I still am not quite sure what you need regarding user selections, but since I'm not specifying in set analysis it will take user selections.)&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 14:12:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381083#M511706</guid>
      <dc:creator>jonvitale</dc:creator>
      <dc:date>2017-12-12T14:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381084#M511707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not really sure what the OP is looking for to propose anything.... few things I can point out in your expressions are this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Aggr(If (Count(distinct VEHICLE_ID) &amp;gt; 0, 1, 0), &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;PBGA_MASTER_ID))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This is probably not a right expression because if you are counting 1s and 0s, they will all be counted. You have two options to fix this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Aggr(If (Count(distinct VEHICLE_ID) &amp;gt; 0, 1), &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;PBGA_MASTER_ID)) &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;-&amp;gt; Make false condition null so that count only counts 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2) &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Aggr(If (Count(distinct VEHICLE_ID) &amp;gt; 0, 1, 0), &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;PBGA_MASTER_ID))&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt; -&amp;gt; Use Sum instead of Count because then 0s will still be summed to 0s and 1s will give you the number you might need.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Alternatively, doing this in set analysis might be another option&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;STRONG&gt;Count(DISTINCT {&amp;lt;PBGA_MASTER_ID = {"=Count(DISTINCT VEHICLE_ID) &amp;gt; 0"}&amp;gt;} &lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;PBGA_MASTER_ID)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is doable because you were only aggregating over a single dimension in your Aggr() function... if this was not the case, then you would not have been able to use set analysis without some manipulation in the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 13:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381084#M511707</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-12-13T13:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381085#M511708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all: Thanks to both of you for the great support so far. All of the mentioned expression from the last replies work and then again not. But let me explain:&lt;BR /&gt;I think I came a bit closer to the reason for this issue which admittedly needs a new approach but hopefully can be solved with a sophisticated expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PBGA_MASTER_ID has also linkages to vehicle manufacturers POE_OE_MAKE_NAME but in case a vehicle manufacturer is not linked to the PBGA_MASTER_ID a user can set a "research request" via the field POER_STATUS_ID and by that a specialised research team can add vehicle linkages for this manufacturer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PBGA_MASTER_ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11178&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;linked to the following manufacturers&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;POE_OE_MAKE_NAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(VEHICLE_ID)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; POER_STATUS_ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Toyota&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; font-size: 13.3333px;"&gt;&lt;STRONG&gt;Mercedes-Benz&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 112&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NULL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;SsangYong&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RR (Research Request)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;As we see SsangYong has no vehicle linkage but set the POER_STATUS_ID "RR" since it needs vehicle linkages.&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;When I am counting the VEHICLE_ID without filters set ("Clear State") Qlik counts the linked VEHICLE_IDs correctly (212 vehicles over 3 manufacturers).&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;In the moment I set a filter like POER_STATUS_ID= RR (Research Request) only SsangYong is considered since it has stored a POER_STATUS_ID against and it's according vehicle count is 0. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;So this seems to reflect the SsangYong count (0) to the whole PBGA_MASTER_ID and I end up with PBGA_MASTER_ID 11178 when I am counting only PBGA_MASTER_ID with 0/NULL vehicle linkages.&lt;BR /&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 means I need an expression that allows me &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;to filter the PBGA_MASTER_IDs &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;where a POER_STATUS_ID is stored for any of it's POE_OE_MAKE_NAME &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;but the aggregated count of vehicles over the whole PBGA_MASTER_IDs is 0/NULL.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&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;Hope that makes sense.&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 15:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381085#M511708</guid>
      <dc:creator>citizenk</dc:creator>
      <dc:date>2017-12-13T15:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with counts and filters</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381086#M511709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be all you need is to ignore selection in POER_STATUS_ID?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT {&amp;lt;PBGA_MASTER_ID = {"=Count(DISTINCT {&amp;lt;POER_STATUS_ID&amp;gt;} VEHICLE_ID) = 0"}, POER_STATUS_ID&amp;gt;} PBGA_MASTER_ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count(DISTINCT {&amp;lt;PBGA_MASTER_ID = {"=Count(DISTINCT {&amp;lt;POER_STATUS_ID&amp;gt;} VEHICLE_ID) = 0"}&amp;gt;} PBGA_MASTER_ID)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 16:09:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-counts-and-filters/m-p/1381086#M511709</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-12-13T16:09:38Z</dc:date>
    </item>
  </channel>
</rss>

