<?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 AutoCollapse Item (based on a condition) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/AutoCollapse-Item-based-on-a-condition/m-p/187304#M51039</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Sep 2009 20:58:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-28T20:58:27Z</dc:date>
    <item>
      <title>AutoCollapse Item (based on a condition)</title>
      <link>https://community.qlik.com/t5/QlikView/AutoCollapse-Item-based-on-a-condition/m-p/187303#M51038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi all, one question not too simple to explain. I have some pivot chart with a tree structure:&lt;/P&gt;&lt;P&gt;A: 8 (5+3)&lt;BR /&gt;Aa: 5 (1+2+2)&lt;BR /&gt;Aa1: 1&lt;BR /&gt;Aa2: 2&lt;BR /&gt;Aa3: 2&lt;BR /&gt;Ab: 3&lt;/P&gt;&lt;P&gt;B: 1&lt;BR /&gt;Bb: 1&lt;BR /&gt;Bb1: 1&lt;/P&gt;&lt;P&gt;C: 11 (7+4)&lt;BR /&gt;Cc: 7 (3+4)&lt;BR /&gt;Cc1: 3&lt;BR /&gt;Cc2: 4&lt;BR /&gt;Cb: 4 (1+3)&lt;BR /&gt;Cb1: 1&lt;BR /&gt;Cb2: 3&lt;/P&gt;&lt;P&gt;now.. that's a normal pivot... but I have also some level calculated starting form other ones (eg.: D = C-A-B) for which I created the single row multiplied per +1 or -1 depending on the sign.&lt;BR /&gt;Every record created has a flag set to 1 that indicates that this is a calculated record. In this way I can recognize them. So in the pivot table where the sum of this flag is &amp;gt;0 I can put the description of the level and his value in BOLD.&lt;/P&gt;&lt;P&gt;It works fine, but now I want to collapse automatically the calculated level (the D level in this case), cause when I design the pivot the D level is expanded per default, like the other ones. So I have this situation:&lt;/P&gt;&lt;P&gt;A: 8 (5+3)&lt;BR /&gt;Aa: 5 (1+2+2)&lt;BR /&gt;Aa1: 1&lt;BR /&gt;Aa2: 2&lt;BR /&gt;Aa3: 2&lt;BR /&gt;Ab: 3&lt;/P&gt;&lt;P&gt;B: 1&lt;BR /&gt;Bb: 1&lt;BR /&gt;Bb1: 1&lt;/P&gt;&lt;P&gt;C: 11 (7+4)&lt;BR /&gt;Cc: 7 (3+4)&lt;BR /&gt;Cc1: 3&lt;BR /&gt;Cc2: 4&lt;BR /&gt;Cb: 4 (1+3)&lt;BR /&gt;Cb1: 1&lt;BR /&gt;Cb2: 3&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt; 2 (11-1-8)&lt;/STRONG&gt; [Line Calculated, below all the addend expanded per default]&lt;BR /&gt;Aa: -5&lt;BR /&gt;Aa1: -1&lt;BR /&gt;Aa2: -2&lt;BR /&gt;Aa3: -2&lt;BR /&gt;Ab: -3&lt;BR /&gt;Bb: -1&lt;BR /&gt;Bb1: -1&lt;BR /&gt;Cc: +7&lt;BR /&gt;Cc1: +3&lt;BR /&gt;Cc2: +4&lt;BR /&gt;Cb: +4&lt;BR /&gt;Cb1: +1&lt;BR /&gt;Cb2: +3&lt;/P&gt;&lt;P&gt;There's a way to do this for example with a macro? I've tried with "ExpandLeft" and "CollapseLeft" but my fault is that I cannot tell to QV the items that have to be collapsed and the ones that should remain expanded.&lt;/P&gt;&lt;P&gt;This is the result I want to obtain:&lt;BR /&gt;A: 8&lt;BR /&gt;Aa: 5&lt;BR /&gt;Aa1: 1&lt;BR /&gt;Aa2: 2&lt;BR /&gt;Aa3: 2&lt;BR /&gt;Ab: 3&lt;BR /&gt;B: 1&lt;BR /&gt;Bb: 1&lt;BR /&gt;Bb1: 1&lt;BR /&gt;C: 11&lt;BR /&gt;Cc: 7&lt;BR /&gt;Cc1: 3&lt;BR /&gt;Cc2: 4&lt;BR /&gt;Cb: 4&lt;BR /&gt;Cb1: 1&lt;BR /&gt;Cb2: 3&lt;BR /&gt;&lt;STRONG&gt;D (Collapsed): 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I hope it's clear.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2009 22:27:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AutoCollapse-Item-based-on-a-condition/m-p/187303#M51038</guid>
      <dc:creator />
      <dc:date>2009-09-15T22:27:39Z</dc:date>
    </item>
    <item>
      <title>AutoCollapse Item (based on a condition)</title>
      <link>https://community.qlik.com/t5/QlikView/AutoCollapse-Item-based-on-a-condition/m-p/187304#M51039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2009 20:58:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/AutoCollapse-Item-based-on-a-condition/m-p/187304#M51039</guid>
      <dc:creator />
      <dc:date>2009-09-28T20:58:27Z</dc:date>
    </item>
  </channel>
</rss>

