<?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: Total count for dimension when different dimension selected in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850070#M1003896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello and thanks for the reply,&lt;/P&gt;&lt;P&gt;yes, exactly. I want to count the number of shops in the same city as the location of shop in dimension line. The second expression works in dimension line, only the total count of shops is 11, but should be 5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 May 2015 09:43:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-27T09:43:57Z</dc:date>
    <item>
      <title>Total count for dimension when different dimension selected</title>
      <link>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850068#M1003894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a table as follows:&lt;/P&gt;&lt;P&gt;Shop_ID,City&lt;/P&gt;&lt;P&gt;shop1,Bonn&lt;/P&gt;&lt;P&gt;shop2,Frankfurt&lt;/P&gt;&lt;P&gt;shop3,Frankfurt&lt;/P&gt;&lt;P&gt;shop4,Dresden&lt;/P&gt;&lt;P&gt;shop5.Frankfurt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I want to know the number of shops in the city. I use count(DISTINCT [Shop ID]). This works fine when City is the dimension:&lt;/P&gt;&lt;P&gt;City, Total_no_of_shops&lt;/P&gt;&lt;P&gt;Bonn, 1&lt;/P&gt;&lt;P&gt;Frankfurt, 3&lt;/P&gt;&lt;P&gt;Dresden, 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I want to filter on the shop_ID and I want this result:&lt;/P&gt;&lt;P&gt;Shop_ID, Total_no_of_shops&lt;/P&gt;&lt;P&gt;Shop1,1&lt;/P&gt;&lt;P&gt;Shop2,3&lt;/P&gt;&lt;P&gt;Shop3,3&lt;/P&gt;&lt;P&gt;Shop4,1&lt;/P&gt;&lt;P&gt;Shop5,3&lt;/P&gt;&lt;P&gt;Total: 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But get either this:&lt;/P&gt;&lt;P&gt;Shop1,1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Shop2,1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Shop3,1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Shop4,1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Shop5,1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Or this:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Shop1,1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Shop2,3&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Shop3,-&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Shop4,1&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Shop5,-&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I've tried total count, set analysis, even loaded another column in script (If isnull(shop_ID),'','1') and tried to calculate with sum instead of count, but at best get the last mentioned result. Could anyone please advice me how to proceed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 11:39:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850068#M1003894</guid>
      <dc:creator />
      <dc:date>2015-05-26T11:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Total count for dimension when different dimension selected</title>
      <link>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850069#M1003895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want to count the number of shops in the same city as the location of shop in dimension line?&lt;/P&gt;&lt;P&gt;(Would be good if you add these requirements, otherwise it's hard to know)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this expression&lt;/P&gt;&lt;P&gt;=sum( aggr(NODISTINCT count(distinct Shop_ID), City))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;=sum( aggr(count(total&amp;lt;City&amp;gt; DISTINCT Shop_ID), City, Shop_ID))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[edited 2nd expression]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 15:30:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850069#M1003895</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-05-26T15:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Total count for dimension when different dimension selected</title>
      <link>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850070#M1003896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello and thanks for the reply,&lt;/P&gt;&lt;P&gt;yes, exactly. I want to count the number of shops in the same city as the location of shop in dimension line. The second expression works in dimension line, only the total count of shops is 11, but should be 5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 09:43:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850070#M1003896</guid>
      <dc:creator />
      <dc:date>2015-05-27T09:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Total count for dimension when different dimension selected</title>
      <link>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850071#M1003897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=if(dimensionality(),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum( aggr(count(total&amp;lt;City&amp;gt; DISTINCT Shop_ID), City, Shop_ID)),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count(distinct Shop_ID)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This uses count(distinct Shop_ID) for the total line (check by dimensionality() ).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 09:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850071#M1003897</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-05-27T09:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Total count for dimension when different dimension selected</title>
      <link>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850072#M1003898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Chartcount.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/87651_Chartcount.png" style="height: 546px; width: 620px;" /&gt;Hi ,&lt;/P&gt;&lt;P&gt;total count you can go to chart properties -&amp;gt; Expression -&amp;gt; you see 'Total Mode'&amp;nbsp; down right corner&lt;/P&gt;&lt;P&gt;Select third option then 'Total count'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 09:54:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850072#M1003898</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-27T09:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Total count for dimension when different dimension selected</title>
      <link>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850073#M1003899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works fine, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 10:09:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850073#M1003899</guid>
      <dc:creator />
      <dc:date>2015-05-27T10:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Total count for dimension when different dimension selected</title>
      <link>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850074#M1003900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the hint!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 10:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Total-count-for-dimension-when-different-dimension-selected/m-p/850074#M1003900</guid>
      <dc:creator />
      <dc:date>2015-05-27T10:09:16Z</dc:date>
    </item>
  </channel>
</rss>

