<?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: Hierarchical categorization of id by array entries of variable length in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Hierarchical-categorization-of-id-by-array-entries-of-variable/m-p/1670164#M50636</link>
    <description>&lt;P&gt;Hi Stan,&lt;/P&gt;&lt;P&gt;You could use a mapping load * inline to load the hierarchical values to the categories of the second column. For example, A=1 and B=2. Then map the hierarchical values to each category (of the second column).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;After that you could do a group by statement per ID to find the minimum hierarchical value per ID. Then you know for each ID the minimum hierarchical value, so you can use that information to map the original categories (which is the third column in your example).&lt;/P&gt;&lt;P&gt;Hope it helps. If you struggle with the scripting I can provide an example.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jan 2020 17:22:57 GMT</pubDate>
    <dc:creator>TimvB</dc:creator>
    <dc:date>2020-01-28T17:22:57Z</dc:date>
    <item>
      <title>Hierarchical categorization of id by array entries of variable length</title>
      <link>https://community.qlik.com/t5/App-Development/Hierarchical-categorization-of-id-by-array-entries-of-variable/m-p/1670145#M50633</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;I'm using QlikSense and I have a complex problem where I'm stuck and wondering how an expert would solve it.&lt;/P&gt;&lt;P&gt;Data structure:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Identifier of the DB entry&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Corresponding array values(variable length per identifier)&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Desired categorization result after evaluating every array entry&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Every Id has an array, which contains a variable amount of entries that all need to be evaluated to reach the desired categorization in the third column. There are no rules whatsoever what might be inside this array, it might also only contain A's and have 1 to X entries. The categorization I need is a hierarchical one, meaning:&lt;/P&gt;&lt;P&gt;If at least one entry is A =&amp;gt; the ID is Category A, Else if at least one entry is B =&amp;gt; the ID is category B&lt;/P&gt;&lt;P&gt;and so forth....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I'm no seasoned developer yet,&amp;nbsp; I would appreciate any pointers on how to approach such a task. At this point I don't even know how to do further research on this or how to describe the underlying problem. I already tried group by loads with match functions but they don't take into account that there are many entries to evaluate.&lt;/P&gt;&lt;P&gt;Do I need some kind of loop? Does QlikSense offer some kind of function for that?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:13:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Hierarchical-categorization-of-id-by-array-entries-of-variable/m-p/1670145#M50633</guid>
      <dc:creator>SB89</dc:creator>
      <dc:date>2024-11-16T19:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hierarchical categorization of id by array entries of variable length</title>
      <link>https://community.qlik.com/t5/App-Development/Hierarchical-categorization-of-id-by-array-entries-of-variable/m-p/1670164#M50636</link>
      <description>&lt;P&gt;Hi Stan,&lt;/P&gt;&lt;P&gt;You could use a mapping load * inline to load the hierarchical values to the categories of the second column. For example, A=1 and B=2. Then map the hierarchical values to each category (of the second column).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;After that you could do a group by statement per ID to find the minimum hierarchical value per ID. Then you know for each ID the minimum hierarchical value, so you can use that information to map the original categories (which is the third column in your example).&lt;/P&gt;&lt;P&gt;Hope it helps. If you struggle with the scripting I can provide an example.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 17:22:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Hierarchical-categorization-of-id-by-array-entries-of-variable/m-p/1670164#M50636</guid>
      <dc:creator>TimvB</dc:creator>
      <dc:date>2020-01-28T17:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: Hierarchical categorization of id by array entries of variable length</title>
      <link>https://community.qlik.com/t5/App-Development/Hierarchical-categorization-of-id-by-array-entries-of-variable/m-p/1670329#M50657</link>
      <description>&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;ha! I'm surprised how easy it is :D. Guess I was thinking too complicated.&lt;BR /&gt;&lt;BR /&gt;I'm using Mapping Loads a lot so I know what to do&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 08:27:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Hierarchical-categorization-of-id-by-array-entries-of-variable/m-p/1670329#M50657</guid>
      <dc:creator>SB89</dc:creator>
      <dc:date>2020-01-29T08:27:49Z</dc:date>
    </item>
  </channel>
</rss>

