<?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 swap expression order in graph using VB script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/swap-expression-order-in-graph-using-VB-script/m-p/218708#M71790</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You could add another expression to your chart, a copy of the first one.&lt;BR /&gt;Then you can disable the first or the third expression to switch the order.&lt;/P&gt;&lt;P&gt;regards&lt;BR /&gt;/Fredrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Jul 2010 10:11:14 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-12T10:11:14Z</dc:date>
    <item>
      <title>swap expression order in graph using VB script</title>
      <link>https://community.qlik.com/t5/QlikView/swap-expression-order-in-graph-using-VB-script/m-p/218707#M71789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="ForumPostBody"&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a QV pivot chart with 3 dimensions and 2 numerical expressions, vertically displayed as bars. The chart is sorted descending on the first expression. I can sort on the second by moving it up in the expression tab of the graphs properties sheet, but i want to make a button to have VB automatically perform this. I have tried the following, but it does not work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="OVERFLOW-X: scroll"&gt;&lt;PRE style="MARGIN: 0px"&gt;&amp;lt;pre&amp;gt;Sub swap_order&lt;BR /&gt;&lt;BR style="PADDING-LEFT: 30px" /&gt;Set obj = ActiveDocument.GetSheetObject("CH03")&lt;BR style="PADDING-LEFT: 30px" /&gt;Set props = obj.GetProperties&lt;BR style="PADDING-LEFT: 30px" /&gt;Set exprs = props.Expressions&lt;BR style="PADDING-LEFT: 30px" /&gt;Set tmp_0 = exprs.item(0)&lt;BR style="PADDING-LEFT: 30px" /&gt;Set tmp_1 = exprs.item(1)&lt;BR style="PADDING-LEFT: 30px" /&gt;exprs.item(1).copyfrom(tmp_0)&lt;BR style="PADDING-LEFT: 30px" /&gt;exprs.item(0).copyfrom(tmp_1)&lt;BR /&gt;End Sub&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I would be really grateful if someone could tell me how to perform this in VB !&lt;/P&gt;&lt;P&gt;with kind regards, Jurjen van der Hoek&lt;/P&gt;&lt;DIV style="CLEAR: both"&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jul 2010 11:04:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/swap-expression-order-in-graph-using-VB-script/m-p/218707#M71789</guid>
      <dc:creator />
      <dc:date>2010-07-09T11:04:34Z</dc:date>
    </item>
    <item>
      <title>swap expression order in graph using VB script</title>
      <link>https://community.qlik.com/t5/QlikView/swap-expression-order-in-graph-using-VB-script/m-p/218708#M71790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You could add another expression to your chart, a copy of the first one.&lt;BR /&gt;Then you can disable the first or the third expression to switch the order.&lt;/P&gt;&lt;P&gt;regards&lt;BR /&gt;/Fredrik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 10:11:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/swap-expression-order-in-graph-using-VB-script/m-p/218708#M71790</guid>
      <dc:creator />
      <dc:date>2010-07-12T10:11:14Z</dc:date>
    </item>
    <item>
      <title>swap expression order in graph using VB script</title>
      <link>https://community.qlik.com/t5/QlikView/swap-expression-order-in-graph-using-VB-script/m-p/218709#M71791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Fredrik, thanks for your reply. I think yoyr suggestion is alright, but making a copy of an expression is not as simple as it might seem. Within the Graph class, there is method AddExpression, but it just has a text argument: &lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;obj.AddExpression ("count([RFCT-refgmt])")&lt;/P&gt;&lt;P&gt;In this way, many properties of the expression are not copied as they are. In my post i also try to make a copy, but my method does not work. Thanks again though, and any other suggestion is welcome&lt;/P&gt;&lt;P&gt;with kind regards, jurjren van der Hoek&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Jul 2010 12:36:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/swap-expression-order-in-graph-using-VB-script/m-p/218709#M71791</guid>
      <dc:creator />
      <dc:date>2010-07-12T12:36:46Z</dc:date>
    </item>
  </channel>
</rss>

