<?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 Button Macro to Create Variable for Chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182061#M1286679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;Thank you for the response and I apologize for being so confusing. It looks like this is going in the right direction but I still can't get it to work properly. What is "v" in the code? The variables I'm creating are not passing to the chart.&lt;/P&gt;&lt;P&gt;What I would like is this: 1. Button to create a variable called "newVar". Eventually, I want Button2 and Button3 to do the same thing via different formulas.&lt;/P&gt;&lt;P&gt;Button 1 will have:: newVar = sum(Sales) &amp;lt;-- Sales is a field in data table in the sheet, On click it sets and the chart is able to call it to dynamically change.&lt;/P&gt;&lt;P&gt;2. Separate sheet object, a Chart , set to reflect the value of the newVar.&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/12/2626.Capture.PNG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/12/2626.Capture.PNG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jan 2010 17:57:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-22T17:57:17Z</dc:date>
    <item>
      <title>Button Macro to Create Variable for Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182059#M1286674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, I am new to QlikView and have recently run into a problem. In my application, I have a chart similar to the example Google Maps chart that comes standard in QV 9. I would like to create a button that runs a macro to create a variable, which I am then able to call on in the chart expressions (in order to dynamically resize and recolor the dots based on the variable's value created by the button).&lt;/P&gt;&lt;P&gt;Any advice on how to go about this? I'm stumped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182059#M1286674</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Button Macro to Create Variable for Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182060#M1286677</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 don't understand your question very well, but if you just want to create a variable:&lt;/P&gt;&lt;P&gt;ActiveDocument.CreateVariable newVar&lt;/P&gt;&lt;P&gt;Set v = ActiveDocument.Variables(newVar)&lt;/P&gt;&lt;P&gt;v.setContent variableContent, true ' variableContent is the formula or expression for your new variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2010 16:42:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182060#M1286677</guid>
      <dc:creator />
      <dc:date>2010-01-22T16:42:18Z</dc:date>
    </item>
    <item>
      <title>Button Macro to Create Variable for Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182061#M1286679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;Thank you for the response and I apologize for being so confusing. It looks like this is going in the right direction but I still can't get it to work properly. What is "v" in the code? The variables I'm creating are not passing to the chart.&lt;/P&gt;&lt;P&gt;What I would like is this: 1. Button to create a variable called "newVar". Eventually, I want Button2 and Button3 to do the same thing via different formulas.&lt;/P&gt;&lt;P&gt;Button 1 will have:: newVar = sum(Sales) &amp;lt;-- Sales is a field in data table in the sheet, On click it sets and the chart is able to call it to dynamically change.&lt;/P&gt;&lt;P&gt;2. Separate sheet object, a Chart , set to reflect the value of the newVar.&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/12/2626.Capture.PNG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/12/2626.Capture.PNG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2010 17:57:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182061#M1286679</guid>
      <dc:creator />
      <dc:date>2010-01-22T17:57:17Z</dc:date>
    </item>
    <item>
      <title>Button Macro to Create Variable for Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182062#M1286681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I made an example. It's very simple&lt;/P&gt;&lt;P&gt;If you have any question feel free to ask.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2010 20:26:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182062#M1286681</guid>
      <dc:creator />
      <dc:date>2010-01-22T20:26:18Z</dc:date>
    </item>
    <item>
      <title>Button Macro to Create Variable for Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182063#M1286684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Steve! Solution was perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might have another question coming soon regarding a button to set a a Year to Date, Week to Date, and Last Week value in separate Year, Week, and Day list boxes but I'm going to give it some more thought first. I really appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~MIchael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jan 2010 01:04:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182063#M1286684</guid>
      <dc:creator />
      <dc:date>2010-01-23T01:04:32Z</dc:date>
    </item>
    <item>
      <title>Button Macro to Create Variable for Chart</title>
      <link>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182064#M1286686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Michael, I forgot to tell you that you have to verify if the variable is already created every time you press the button.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jan 2010 01:31:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Button-Macro-to-Create-Variable-for-Chart/m-p/182064#M1286686</guid>
      <dc:creator />
      <dc:date>2010-01-23T01:31:57Z</dc:date>
    </item>
  </channel>
</rss>

