<?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 Remove all dimensions except specific with macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Remove-all-dimensions-except-specific-with-macro/m-p/211746#M65938</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thanks for answering - I can see where you're going but what would the syntax for "Condition" be? For instance if I don't wnat to remove a dimension called "Name"? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Apr 2010 09:59:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-13T09:59:31Z</dc:date>
    <item>
      <title>Remove all dimensions except specific with macro</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-all-dimensions-except-specific-with-macro/m-p/211744#M65936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;I'm trying to remove all dimensions from a chart using a macro but I don't want to remove 2 specific dimensions.&lt;/P&gt;&lt;P&gt;I have this code that removes all dimensions:&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code" style="font-weight: bold"&gt;set chart = ActiveDocument.GetSheetObject("CH01")&lt;BR /&gt;&lt;BR /&gt;'clean chart&lt;BR /&gt;&lt;BR /&gt;set dims = chart.GetProperties.Dimensions&lt;BR /&gt;set exps = chart.GetProperties.Expressions&lt;BR /&gt;&lt;BR /&gt;for i=0 to dims.Count&lt;BR /&gt;&lt;BR /&gt;chart.RemoveDimension 0&lt;BR /&gt;&lt;BR /&gt;next&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I thought I could just put an if statement within the for loop to skip the remove for my desired dimensions but I can't work out the syntax, please can anyone advise?&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 08:54:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-all-dimensions-except-specific-with-macro/m-p/211744#M65936</guid>
      <dc:creator />
      <dc:date>2010-04-13T08:54:47Z</dc:date>
    </item>
    <item>
      <title>Remove all dimensions except specific with macro</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-all-dimensions-except-specific-with-macro/m-p/211745#M65937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Please try the following code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;set chart = ActiveDocument.GetSheetObject("CH01")&lt;BR /&gt;'clean chart&lt;BR /&gt;set dims = chart.GetProperties.Dimensions&lt;BR /&gt;set exps = chart.GetProperties.Expressions&lt;BR /&gt;&lt;STRONG&gt;j = 0&lt;BR /&gt;for i=0 to dims.Count&lt;BR /&gt;&lt;/STRONG&gt; if Condition Then&lt;BR /&gt; chart.RemoveDimension j&lt;BR /&gt; &lt;STRONG&gt;else&lt;BR /&gt; j = j + 1&lt;BR /&gt; end if&lt;BR /&gt;next&lt;BR /&gt;&lt;/STRONG&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;STRONG&gt;Cheers&lt;BR /&gt;Darius&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 09:56:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-all-dimensions-except-specific-with-macro/m-p/211745#M65937</guid>
      <dc:creator>d_pranskus</dc:creator>
      <dc:date>2010-04-13T09:56:18Z</dc:date>
    </item>
    <item>
      <title>Remove all dimensions except specific with macro</title>
      <link>https://community.qlik.com/t5/QlikView/Remove-all-dimensions-except-specific-with-macro/m-p/211746#M65938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thanks for answering - I can see where you're going but what would the syntax for "Condition" be? For instance if I don't wnat to remove a dimension called "Name"? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Apr 2010 09:59:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Remove-all-dimensions-except-specific-with-macro/m-p/211746#M65938</guid>
      <dc:creator />
      <dc:date>2010-04-13T09:59:31Z</dc:date>
    </item>
  </channel>
</rss>

