<?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: Defining a local variable in a chart expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267422#M583270</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;When you create the variable don't have an =.&amp;nbsp; Just the expression.&amp;nbsp;&amp;nbsp; Then to reference it in the expression you would do something like:&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vVariableName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Oct 2011 19:24:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-10-21T19:24:52Z</dc:date>
    <item>
      <title>Defining a local variable in a chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267421#M583269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to define a local variable within a chart expression? I need to manipulate a calculated value multiple times in the same expression and it would make my expression much cleaner and easier to manage if I could just refer to a variable instead of copying the calculation every time I need the value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 18:47:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267421#M583269</guid>
      <dc:creator />
      <dc:date>2011-10-21T18:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a local variable in a chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267422#M583270</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;When you create the variable don't have an =.&amp;nbsp; Just the expression.&amp;nbsp;&amp;nbsp; Then to reference it in the expression you would do something like:&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vVariableName)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2011 19:24:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267422#M583270</guid>
      <dc:creator />
      <dc:date>2011-10-21T19:24:52Z</dc:date>
    </item>
    <item>
      <title>Defining a local variable in a chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267423#M583271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hey Jeff, sorry I haven't gotten back to this in a while. I've never worked with variables before, so I'm not even sure where to begin with that. Do you create variables in the load script? And can you give me an example of what a simple variable definition looks like and how it differs from what you suggested above?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2011 14:31:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267423#M583271</guid>
      <dc:creator />
      <dc:date>2011-11-01T14:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a local variable in a chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267424#M583272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you planning to use the variable in the load script? Or would you be using it in your charts/tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using in the load script an example would be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vVariable = 'sum expression&lt;/P&gt;&lt;P&gt;referenced with $(vVariable)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not in the load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Settings --&amp;gt; Variable Overview --&amp;gt; Add&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Name your variable then click on it, and down in the definition box, write your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2011 14:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267424#M583272</guid>
      <dc:creator />
      <dc:date>2011-11-01T14:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a local variable in a chart expression</title>
      <link>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267425#M583273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I think that makes sense. I guess my question was whether it was possible to define a variable within a chart expression (useful and less cluttered than other options if you use the same piece of code multiple times in a single expression but nowhere else in qview file). I suppose defining it in Variable Overview is an ok substitute. Thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2011 15:05:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Defining-a-local-variable-in-a-chart-expression/m-p/267425#M583273</guid>
      <dc:creator />
      <dc:date>2011-11-01T15:05:00Z</dc:date>
    </item>
  </channel>
</rss>

