<?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 How to get counts on unselected items in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-get-counts-on-unselected-items/m-p/159654#M34215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply,&lt;/P&gt;&lt;P&gt;Count Distincts work fine, the problem comes when calculating the Total Existing items. Your suggestion returns 0 because no Items or Departments have been selected. Maybe those functions only work on actual selections in a field?&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Jan 2011 13:32:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-01-07T13:32:02Z</dc:date>
    <item>
      <title>How to get counts on unselected items</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-counts-on-unselected-items/m-p/159652#M34213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm hopeful that someone can find an answer to my problem:&lt;/P&gt;&lt;P&gt;Considering a table as follows:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="112"&gt;&lt;COL style="width: 56pt;" width="74" /&gt;&lt;COL style="width: 29pt;" width="38" /&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl66" height="17" style="height: 12.75pt; width: 56pt;" width="74"&gt;&lt;B&gt;Department&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; width: 29pt;" width="38"&gt;&lt;B&gt;Item&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;w&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;x&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;y&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;z&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;x&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;y&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;z&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;C&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;y&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;C&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;z&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I want to create a label with the following text in it:&lt;/P&gt;&lt;P&gt;&lt;B&gt;Label&lt;/B&gt;: You are seeing information for [number of departments] department(s) and [number of items] item(s) of a possible [total existing items within the departments available].&lt;/P&gt;&lt;P&gt;My problem is, when a selection is made within my Qlikview model and the above table results in something like this:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="169"&gt;&lt;COL style="width: 71pt;" width="95" /&gt;&lt;COL style="width: 56pt;" width="74" /&gt;&lt;TBODY&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl66" height="17" style="height: 12.75pt; width: 71pt;" width="95"&gt;&lt;B&gt;Department&lt;/B&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; width: 56pt;" width="74"&gt;&lt;B&gt;Item&lt;/B&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;A&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;x&lt;/TD&gt;&lt;/TR&gt;&lt;TR height="17" style="height: 12.75pt;"&gt;&lt;TD class="xl65" height="17" style="height: 12.75pt; border-top: medium none;"&gt;B&lt;/TD&gt;&lt;TD class="xl65" style="border-top: medium none; border-left: medium none;"&gt;y&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Where [Number of departments] = 2; [Number of items] = 2; [Total existing items = 7]&lt;/P&gt;&lt;P&gt;And considering that Department or item values A,B,x,y &lt;B&gt;haven't&lt;/B&gt; been selected in the model and are just the available results of other selections, how can I calculate the above numbers using set analysis? If possible I would like to avoid having to modify the load scripts.&lt;/P&gt;&lt;P&gt;Thank you for helping!&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="height: 170px;" width="112"&gt;&lt;COL style="width: 56pt;" width="74" /&gt;&lt;COL style="width: 29pt;" width="38" /&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 12:46:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-counts-on-unselected-items/m-p/159652#M34213</guid>
      <dc:creator />
      <dc:date>2011-01-07T12:46:08Z</dc:date>
    </item>
    <item>
      <title>How to get counts on unselected items</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-counts-on-unselected-items/m-p/159653#M34214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You can write an expression like this&lt;/P&gt;&lt;P&gt;='Where [Number of departments] =' &amp;amp; Count(Distinct Department) &amp;amp; '; [Number of items] = ' &amp;amp; Count(Distinct Item) &amp;amp; '; [Total existing items = ' &amp;amp; (getselectedcount(Item) + getnotselectedcount(Item)) &amp;amp; ']'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 13:16:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-counts-on-unselected-items/m-p/159653#M34214</guid>
      <dc:creator>amars</dc:creator>
      <dc:date>2011-01-07T13:16:14Z</dc:date>
    </item>
    <item>
      <title>How to get counts on unselected items</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-counts-on-unselected-items/m-p/159654#M34215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply,&lt;/P&gt;&lt;P&gt;Count Distincts work fine, the problem comes when calculating the Total Existing items. Your suggestion returns 0 because no Items or Departments have been selected. Maybe those functions only work on actual selections in a field?&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 13:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-counts-on-unselected-items/m-p/159654#M34215</guid>
      <dc:creator />
      <dc:date>2011-01-07T13:32:02Z</dc:date>
    </item>
    <item>
      <title>How to get counts on unselected items</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-counts-on-unselected-items/m-p/159655#M34216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might have found the answer. With this formula I seem to be getting the right result for the Total Existing Items:&lt;/P&gt;&lt;P&gt;=Count({1&amp;lt;Department=P({$}Department)&amp;gt;} Item)&lt;/P&gt;&lt;P&gt;Which means that, excluding the current selection, count the total items for the current possible Departments.&lt;/P&gt;&lt;P&gt;I'm not convinced that getting the right results isn't just a coincidence though. Would someone be able to comment on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 14:20:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-counts-on-unselected-items/m-p/159655#M34216</guid>
      <dc:creator />
      <dc:date>2011-01-07T14:20:28Z</dc:date>
    </item>
  </channel>
</rss>

