<?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: Conditional dimension display with macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412090#M694804</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alan for answering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know you can hide or show Dimensions with variables, but I wonder how to set up which variable to use for which dimension with a macro. &lt;/P&gt;&lt;P&gt;For example, I want to add a dimension called &lt;EM&gt;Test &lt;/EM&gt;and I want this dimension to be displayed if the variable &lt;EM&gt;show&lt;/EM&gt; = 1 (the variable already exists). I can add the dimension with &lt;EM&gt;.AddDimension "Test" &lt;/EM&gt;but I don't know how to manage the conditional display with macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 May 2013 07:41:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-29T07:41:59Z</dc:date>
    <item>
      <title>Conditional dimension display with macro</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412086#M694800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a PivotTable through a macro. I need to use a macro because :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - The dimensions are variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - The number of dimensions is variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - The number of rows or columns is variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - A dimension can be hide with a clic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can do it except the last point (when the selection changes, I delete all the dimensions and then I add the dimensions I need). I looked into the API but I didn't find the right method. I tried &lt;/P&gt;&lt;P&gt;&lt;EM&gt;ActiveDocument.GetSheetObject("CH02").GetProperties.Dimensions(0).AttributeExpressions.ShowValueExp.Definition.v = "{condition}"&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;but it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enzo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2013 16:03:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412086#M694800</guid>
      <dc:creator />
      <dc:date>2013-05-27T16:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional dimension display with macro</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412087#M694801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: left;"&gt;Enzo, &lt;/P&gt;&lt;P style="text-align: left;"&gt;Try the following link..will give information about hiding dimension using macro.&lt;/P&gt;&lt;P style="text-align: left;"&gt; &lt;A href="http://www.citagus.com/citagus/blog/hiding-dimensions-in-qlikview-pivot-table/"&gt;http://www.citagus.com/citagus/blog/hiding-dimensions-in-qlikview-pivot-table/&lt;/A&gt; &lt;/P&gt;&lt;P style="text-align: left;"&gt;and this thread &lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/thread/17457"&gt;http://community.qlik.com/thread/17457&lt;/A&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Regards.&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;siva&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 04:14:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412087#M694801</guid>
      <dc:creator>Siva_Sankar</dc:creator>
      <dc:date>2013-05-28T04:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional dimension display with macro</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412088#M694802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks siva for your help. &lt;/P&gt;&lt;P&gt;It's a good idea and it will probably work (I can't test right now).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if it is possible to fill the field of conditional display for a dimension with macro (I use QV in french so I don't know the exact word for this field in english). Do you know something about it ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enzo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 14:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412088#M694802</guid>
      <dc:creator />
      <dc:date>2013-05-28T14:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional dimension display with macro</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412089#M694803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can be done using varables to show or hide Dimensions and Expressions&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 May 2013 14:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412089#M694803</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-05-28T14:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional dimension display with macro</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412090#M694804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Alan for answering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know you can hide or show Dimensions with variables, but I wonder how to set up which variable to use for which dimension with a macro. &lt;/P&gt;&lt;P&gt;For example, I want to add a dimension called &lt;EM&gt;Test &lt;/EM&gt;and I want this dimension to be displayed if the variable &lt;EM&gt;show&lt;/EM&gt; = 1 (the variable already exists). I can add the dimension with &lt;EM&gt;.AddDimension "Test" &lt;/EM&gt;but I don't know how to manage the conditional display with macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 May 2013 07:41:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412090#M694804</guid>
      <dc:creator />
      <dc:date>2013-05-29T07:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional dimension display with macro</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412091#M694805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it can help. I tried several things and I find a function that doesn't appear in API but it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To fill the field &lt;STRONG&gt;Enable Conditional&lt;/STRONG&gt; you need to use the attribute &lt;EM&gt;EnableCondition.Type&lt;/EM&gt; and &lt;EM&gt;EnableCondtion.Expression&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;EnableCondition&lt;/EM&gt; is a bit like &lt;EM&gt;Show&lt;/EM&gt;, it means &lt;EM&gt;EnableCondition.Type&lt;/EM&gt; can be 0, 1 or 2. I didn't find any diffrences between the values 1 and 0, but the value 2 activate the &lt;STRONG&gt;Enable Conditional&lt;/STRONG&gt; field. &lt;/P&gt;&lt;P&gt;The expression of the condition can be set with &lt;EM&gt;EnableCondition.Expression&lt;/EM&gt; and can be see in the user interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can attach a condition to a dimension thanks to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an exemple :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set obj = ActiveDocument.GetSheetObject("CH08")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set objProp = obj.GetProperties&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;set variable = objProp.Dimensions(0).EnableCondition&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;variable.Type = 2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;variable.Expression = {condition}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;obj.SetProperties objProp&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jun 2013 15:53:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-dimension-display-with-macro/m-p/412091#M694805</guid>
      <dc:creator />
      <dc:date>2013-06-03T15:53:36Z</dc:date>
    </item>
  </channel>
</rss>

