<?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: Child count in hierarchy in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540386#M691637</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Henric&lt;/P&gt;&lt;P&gt;Ok I understand the tip to get the root parent&lt;/P&gt;&lt;P&gt;Anyway it just give a root level in the treeview : the ttreeview was working without it !&lt;/P&gt;&lt;P&gt;Now I'm trying to understand the concept of HierarchyBelongsTo which is not very clear !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm developping in Qlikview since a few day ans some mechanism are a bit confusing&lt;/P&gt;&lt;P&gt;Probably because I get my habit from years of C and cSharp programing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Aug 2013 13:42:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-28T13:42:32Z</dc:date>
    <item>
      <title>Child count in hierarchy</title>
      <link>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540381#M691632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello&lt;/P&gt;&lt;P&gt;Yesterday I've discovered the hierarchy function in Qlikview&lt;/P&gt;&lt;P&gt;This is great !&lt;/P&gt;&lt;P&gt;So I set the result in a listbox displayed as TreeView&lt;/P&gt;&lt;P&gt;But Is it possible to display the child count fo each node ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 08:40:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540381#M691632</guid>
      <dc:creator />
      <dc:date>2013-08-28T08:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Child count in hierarchy</title>
      <link>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540382#M691633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes and No...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can achieve it fairly simply if you build a smart data model, but there is no built-in capability to do this - or rather, it is most likely possible if you use a very complex formula.... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you post your data, so I can take a look at it? I am working on a &lt;A _jive_internal="true" href="https://community.qlik.com/people/hic/content?filterID=contentstatus[published]~objecttype~objecttype[blogpost]&amp;amp;sortKey=contentstatus[published]~creationDateDesc&amp;amp;sortOrder=0"&gt;blog post&lt;/A&gt; on this topic, and would appreciate some examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC / QlikTech Technical Product Advocate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 08:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540382#M691633</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-08-28T08:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Child count in hierarchy</title>
      <link>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540383#M691634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes I can send an xls or txt file with the data and the load script !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 09:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540383#M691634</guid>
      <dc:creator />
      <dc:date>2013-08-28T09:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Child count in hierarchy</title>
      <link>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540384#M691635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.filedropper.com/hierarchytest" title="http://www.filedropper.com/hierarchytest"&gt;http://www.filedropper.com/hierarchytest&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the script for sql load but easy to adapt for the textfile&lt;/P&gt;&lt;P&gt;ccy:&lt;/P&gt;&lt;P&gt;Hierarchy(hcompanyid,hparentid,hcompanyname,brolekes,hcompanyname)&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;companyid as hcompanyid,&lt;/P&gt;&lt;P&gt;parentid as hparentid,&lt;/P&gt;&lt;P&gt;companyname as hcompanyname,&lt;/P&gt;&lt;P&gt;parentname as hparentname;&lt;/P&gt;&lt;P&gt;SQL SELECT DISTINCT&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; company.companyid,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; company.parentcompanyid as parentid,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; parent.name AS parentname,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; company.name AS companyname&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt; public.fs_company company&lt;/P&gt;&lt;P&gt; INNER JOIN public.fs_company parent on parent.companyid=company.parentcompanyid&lt;/P&gt;&lt;P&gt; WHERE &lt;/P&gt;&lt;P&gt; company.active='t' &lt;/P&gt;&lt;P&gt; and company.companyid&amp;lt;&amp;gt;1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 10:01:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540384#M691635</guid>
      <dc:creator />
      <dc:date>2013-08-28T10:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Child count in hierarchy</title>
      <link>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540385#M691636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Olivier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would load this using the attached script.&lt;/P&gt;&lt;P&gt;1: Your file is missing one record: The root node. Note that every node must have a record of its own. I fix this by loading all nodes int two steps into a temporary table using "Where Not Exists()".&lt;/P&gt;&lt;P&gt;2: I use HierarchyBelongsTo to generate all subnodes of a node. Then the number of subnodes can be calculated using Count(distinct SubNodeID).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="data model.png" class="jive-image" src="/legacyfs/online/45962_data model.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 10:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540385#M691636</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-08-28T10:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Child count in hierarchy</title>
      <link>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540386#M691637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Henric&lt;/P&gt;&lt;P&gt;Ok I understand the tip to get the root parent&lt;/P&gt;&lt;P&gt;Anyway it just give a root level in the treeview : the ttreeview was working without it !&lt;/P&gt;&lt;P&gt;Now I'm trying to understand the concept of HierarchyBelongsTo which is not very clear !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm developping in Qlikview since a few day ans some mechanism are a bit confusing&lt;/P&gt;&lt;P&gt;Probably because I get my habit from years of C and cSharp programing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 13:42:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540386#M691637</guid>
      <dc:creator />
      <dc:date>2013-08-28T13:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Child count in hierarchy</title>
      <link>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540387#M691638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HierarchyBelongsTo is quite simple. It returns a list of all Ancestor-Daughter combinations. If your input is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="192"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="53"&gt;NodeID&lt;/TD&gt;&lt;TD class="xl65" width="62"&gt;ParentID&lt;/TD&gt;&lt;TD class="xl65" width="77"&gt;NodeName&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;3&lt;/TD&gt;&lt;TD align="right"&gt;2&lt;/TD&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;4&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;TD&gt;Bordeaux&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;5&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;TD&gt;Medoc&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will return&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="307"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="53"&gt;NodeID&lt;/TD&gt;&lt;TD class="xl65" width="77"&gt;NodeName&lt;/TD&gt;&lt;TD class="xl65" width="77"&gt;AncestorID&lt;/TD&gt;&lt;TD class="xl65" width="100"&gt;AncestorName&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;3&lt;/TD&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;4&lt;/TD&gt;&lt;TD&gt;Bordeaux&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;TD&gt;Bordeaux&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;5&lt;/TD&gt;&lt;TD&gt;Medoc&lt;/TD&gt;&lt;TD align="right"&gt;5&lt;/TD&gt;&lt;TD&gt;Medoc&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;4&lt;/TD&gt;&lt;TD&gt;Bordeaux&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;5&lt;/TD&gt;&lt;TD&gt;Medoc&lt;/TD&gt;&lt;TD align="right"&gt;4&lt;/TD&gt;&lt;TD&gt;Bordeaux&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;5&lt;/TD&gt;&lt;TD&gt;Medoc&lt;/TD&gt;&lt;TD align="right"&gt;3&lt;/TD&gt;&lt;TD&gt;France&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 14:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Child-count-in-hierarchy/m-p/540387#M691638</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2013-08-28T14:23:35Z</dc:date>
    </item>
  </channel>
</rss>

