<?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: Pivot table - using formulas depending on the hierarchie in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Pivot-table-using-formulas-depending-on-the-hierarchie/m-p/1203748#M22901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The solution I were looking for is the dimensionality() function.&lt;/P&gt;&lt;P&gt;With its help i can easily use a formula based on the hierarchy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Oct 2016 09:49:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-10-10T09:49:33Z</dc:date>
    <item>
      <title>Pivot table - using formulas depending on the hierarchie</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-table-using-formulas-depending-on-the-hierarchie/m-p/1203747#M22900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently trying to create a Pivot-Table, which should display data from 3 different hierarchies (H).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logic:&lt;/P&gt;&lt;P&gt;H1 -&amp;gt; 1 or more H2&lt;/P&gt;&lt;P&gt;H2 -&amp;gt; 1 or more H3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pivot:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - H1 =(avg(x))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +H2 =(sum(x))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +H2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -H2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; H3 =(x)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; H3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Those Hierarchies are currently stored in 2 tables (H1 in table 1, H2 and H3 in table 2).&lt;/P&gt;&lt;P&gt;Those tables are connected by a key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the top Hierarchie H1 to be displayed (as shown) as the first item in the pivot table, H2 as a subitem and H3 as a subitem of H2.&lt;/P&gt;&lt;P&gt;That is not a problem.&lt;/P&gt;&lt;P&gt;The problem starts when trying to add a formula, which applies to all 3 hierarchies, but is calculated differently in hierarchie H1.&lt;/P&gt;&lt;P&gt;Since I can only use 1 formula for all 3 hierarchies combined, how can I manage to calculate values differently depending on the hierarchie?&lt;/P&gt;&lt;P&gt;I found the IF() condition to be helpful, since the value of H2 happened to be null sometimes after the qlik-sense automatic join over the table key, allowing me to address H1 if H2 is null.&lt;/P&gt;&lt;P&gt;Unfortunately that is only the case if H1 has more than 1 H2 items, otherwise it is not null.&lt;/P&gt;&lt;P&gt;Is there a way to solve this problem?&lt;/P&gt;&lt;P&gt;If so, please let me know &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2016 07:09:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-table-using-formulas-depending-on-the-hierarchie/m-p/1203747#M22900</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-06T07:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot table - using formulas depending on the hierarchie</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-table-using-formulas-depending-on-the-hierarchie/m-p/1203748#M22901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The solution I were looking for is the dimensionality() function.&lt;/P&gt;&lt;P&gt;With its help i can easily use a formula based on the hierarchy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Oct 2016 09:49:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-table-using-formulas-depending-on-the-hierarchie/m-p/1203748#M22901</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-10T09:49:33Z</dc:date>
    </item>
  </channel>
</rss>

