<?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 Changing Chart dimension with a macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185706#M50092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello badarf,&lt;/P&gt;&lt;P&gt;You can write something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sub ChangeTimeGrain&lt;BR /&gt; set ch = ActiveDocument.GetSheetObject( "CH285" )&lt;BR /&gt; ch.RemoveDimension( 0 )&lt;BR /&gt; ch.AddDimension( ActiveDocument.Variables( "vTimeGrain" ).GetContent.String )&lt;BR /&gt;end sub&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Here, CH285 is the ID of the chart whose dimension is to be changed. vTimeGrain is controlled by an Input Box that lets the user select only the allowed dimension names.&lt;/P&gt;&lt;P&gt;A similar macro code can be written for changing / adding expressions (formulas). See APIguide.qvw for a detailed documentation.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Hellmar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Sep 2009 19:52:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-14T19:52:48Z</dc:date>
    <item>
      <title>Changing Chart dimension with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185705#M50091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using a cyclic group as a dimension in a qlikview chart. Clicking on that cylic group I can show data for three different metrics on the X-Axis.&lt;/P&gt;&lt;P&gt;My question is if there is some way in which it is possible to use a a cyclic group in the expression column - i.e. if I can create a sum(category1), count(catergoy2) into a group which can i use that as an expression? (by default cyclic variables dont show up in the expressions pull down lists).&lt;/P&gt;&lt;P&gt;Can a similar effect be acheived through the use of macros? Can I dynamically add/delete/change the expressions in the chart?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 19:17:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185705#M50091</guid>
      <dc:creator />
      <dc:date>2009-09-14T19:17:35Z</dc:date>
    </item>
    <item>
      <title>Changing Chart dimension with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185706#M50092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello badarf,&lt;/P&gt;&lt;P&gt;You can write something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sub ChangeTimeGrain&lt;BR /&gt; set ch = ActiveDocument.GetSheetObject( "CH285" )&lt;BR /&gt; ch.RemoveDimension( 0 )&lt;BR /&gt; ch.AddDimension( ActiveDocument.Variables( "vTimeGrain" ).GetContent.String )&lt;BR /&gt;end sub&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Here, CH285 is the ID of the chart whose dimension is to be changed. vTimeGrain is controlled by an Input Box that lets the user select only the allowed dimension names.&lt;/P&gt;&lt;P&gt;A similar macro code can be written for changing / adding expressions (formulas). See APIguide.qvw for a detailed documentation.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Hellmar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 19:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185706#M50092</guid>
      <dc:creator />
      <dc:date>2009-09-14T19:52:48Z</dc:date>
    </item>
    <item>
      <title>Changing Chart dimension with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185707#M50093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;P. S. It is also possible to create Formula Groups. This is done in the formula editor for a chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2009 19:54:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185707#M50093</guid>
      <dc:creator />
      <dc:date>2009-09-14T19:54:17Z</dc:date>
    </item>
    <item>
      <title>Changing Chart dimension with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185708#M50094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Hellmar. That worked just fine. I somehow missed teh APIguide.qvw before.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2009 16:33:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185708#M50094</guid>
      <dc:creator />
      <dc:date>2009-09-15T16:33:15Z</dc:date>
    </item>
    <item>
      <title>Changing Chart dimension with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185709#M50095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Both&lt;/P&gt;&lt;P&gt;I know this one has already been answered but I just thought I'd put my thoughts in here.&lt;/P&gt;&lt;P&gt;I have used the macro functions to dynamically add/remove dimensions before and I got into all sorts of problems with it, whilst the adding/removing always worked it would often start to put the dimensions on the right side of the table which is impossible in normal operations.&lt;/P&gt;&lt;P&gt;If the question is simply to allow cyclic expressions then this can be achieved using the group button in the expressions tab, this will produce a "cycle" expression container (but remember, this is not a cyclic group in the ture sense).&lt;/P&gt;&lt;P&gt;If my assumption is not right then it is still possible to change the expression according to the value of the cyclic dimension, just by creating an expression such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;=IF(GetCurrentField("cyclic_group_name") = "Field Name 1" , expression 1, IF(GetCurrentField("cyclic_group_name") = "Field name 2" , expression 2 , expression 3 ) )&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;We make very heavy use of macros here, but the advice from QlikTech is to avoid them if possible, which is what I try (and often fail) to do.&lt;/P&gt;&lt;P&gt;Sorry about jumping in at the last minute.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2009 19:34:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Changing-Chart-dimension-with-a-macro/m-p/185709#M50095</guid>
      <dc:creator />
      <dc:date>2009-09-15T19:34:13Z</dc:date>
    </item>
  </channel>
</rss>

