<?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 Make dynamic groups and count elements in each group in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Make-dynamic-groups-and-count-elements-in-each-group/m-p/203868#M61035</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 have a QlikView riddle, that prevent me to sleep.&lt;/P&gt;&lt;P&gt;Lets imagine I have products sorted by a main category ("Eatable", "Transport"), and a sub category ("Fruit", "Vegetable" for the "Eatable" and "Bike", "Car" for the "Transport").&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1346_sourceID:1346" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a price for each product, and a "sales" table that give me the number of item sold.&lt;/P&gt;&lt;P&gt;With the formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;sum(aggr(Sum(Qtt) * only(Price), Prod))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I have the sum of the sales, and even if I collapse my dimension, I have the right sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the riddle... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to make a classification between my products : the products having a sum of sales equal to "0", the products having a sum of sales &amp;gt; 0 and &amp;lt; 50, and the products having a sum of sales &amp;gt;= 50. The classification is labeled "none", "few", and "many".&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1347_sourceID:1347" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I would like to make a pie chart displaying for each "MainCateg" or "Categ" the count of products labeled "none", "few", "many".&lt;/P&gt;&lt;P&gt;If I'm on the "MainCateg" "Eatable", I want to see a pie with :&lt;BR /&gt;- 1 "none"&lt;BR /&gt;- 2 "few"&lt;BR /&gt;- 1 "many"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do that, I have to make a calculated dimension that gives "none" / "few" / "many".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried many things, but I don't have a result that allows me to drill down from "MainCateg" to "Prod".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea how to do that ?&lt;/P&gt;&lt;P&gt;I attached the QVW file I work on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Apr 2010 15:23:34 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-06T15:23:34Z</dc:date>
    <item>
      <title>Make dynamic groups and count elements in each group</title>
      <link>https://community.qlik.com/t5/QlikView/Make-dynamic-groups-and-count-elements-in-each-group/m-p/203868#M61035</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 have a QlikView riddle, that prevent me to sleep.&lt;/P&gt;&lt;P&gt;Lets imagine I have products sorted by a main category ("Eatable", "Transport"), and a sub category ("Fruit", "Vegetable" for the "Eatable" and "Bike", "Car" for the "Transport").&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1346_sourceID:1346" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a price for each product, and a "sales" table that give me the number of item sold.&lt;/P&gt;&lt;P&gt;With the formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;sum(aggr(Sum(Qtt) * only(Price), Prod))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I have the sum of the sales, and even if I collapse my dimension, I have the right sum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the riddle... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to make a classification between my products : the products having a sum of sales equal to "0", the products having a sum of sales &amp;gt; 0 and &amp;lt; 50, and the products having a sum of sales &amp;gt;= 50. The classification is labeled "none", "few", and "many".&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1347_sourceID:1347" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I would like to make a pie chart displaying for each "MainCateg" or "Categ" the count of products labeled "none", "few", "many".&lt;/P&gt;&lt;P&gt;If I'm on the "MainCateg" "Eatable", I want to see a pie with :&lt;BR /&gt;- 1 "none"&lt;BR /&gt;- 2 "few"&lt;BR /&gt;- 1 "many"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do that, I have to make a calculated dimension that gives "none" / "few" / "many".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried many things, but I don't have a result that allows me to drill down from "MainCateg" to "Prod".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea how to do that ?&lt;/P&gt;&lt;P&gt;I attached the QVW file I work on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Apr 2010 15:23:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-dynamic-groups-and-count-elements-in-each-group/m-p/203868#M61035</guid>
      <dc:creator />
      <dc:date>2010-04-06T15:23:34Z</dc:date>
    </item>
    <item>
      <title>Make dynamic groups and count elements in each group</title>
      <link>https://community.qlik.com/t5/QlikView/Make-dynamic-groups-and-count-elements-in-each-group/m-p/203869#M61036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still don't have the drill down feature I want, but I managed to have the dynamic dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 17:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-dynamic-groups-and-count-elements-in-each-group/m-p/203869#M61036</guid>
      <dc:creator />
      <dc:date>2010-04-08T17:00:30Z</dc:date>
    </item>
    <item>
      <title>Make dynamic groups and count elements in each group</title>
      <link>https://community.qlik.com/t5/QlikView/Make-dynamic-groups-and-count-elements-in-each-group/m-p/203870#M61037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the soloution to your scenario:&lt;/P&gt;&lt;P&gt;Create an INLINE table as below and another table to join using Interval Match&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;SalesRange:&lt;BR /&gt;LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt;RangeText;RangeLow;RangeHigh&lt;BR /&gt;None;0,0&lt;BR /&gt;Few;1,45&lt;BR /&gt;Many;46,10000&lt;BR /&gt;] (delimiter is ';')&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;JOIN(SalesRange) IntervalMatch(Sales) Load RangeLow, RangeHigh Resident SalesRange ORDER BY RangeLow ASC;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;In the above code, I assume 'Sales' as the column name for Sales in your base table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 08:52:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-dynamic-groups-and-count-elements-in-each-group/m-p/203870#M61037</guid>
      <dc:creator>vupen</dc:creator>
      <dc:date>2010-04-12T08:52:22Z</dc:date>
    </item>
    <item>
      <title>Make dynamic groups and count elements in each group</title>
      <link>https://community.qlik.com/t5/QlikView/Make-dynamic-groups-and-count-elements-in-each-group/m-p/203871#M61038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/0511.Expression-in-group.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/0511.Expression-in-group.jpg" /&gt;&lt;/A&gt;Hi&lt;/P&gt;&lt;P&gt;Just add the calculated dimension to the Dimension Group using Button "Add Expression".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Darius&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Apr 2010 09:57:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Make-dynamic-groups-and-count-elements-in-each-group/m-p/203871#M61038</guid>
      <dc:creator>d_pranskus</dc:creator>
      <dc:date>2010-04-12T09:57:48Z</dc:date>
    </item>
  </channel>
</rss>

