<?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 Multiple definitions for one Variable. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-definitions-for-one-Variable/m-p/388618#M1154368</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created some line charts with similar looking but different expressions and different formula. I used several variables to make my charts dynamic. I would like to see whether I can have different definitions for one variable in order to reduce the number of variables and to make the maintenance easier. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Longmatch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Mar 2013 14:20:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-25T14:20:44Z</dc:date>
    <item>
      <title>Multiple definitions for one Variable.</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-definitions-for-one-Variable/m-p/388618#M1154368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created some line charts with similar looking but different expressions and different formula. I used several variables to make my charts dynamic. I would like to see whether I can have different definitions for one variable in order to reduce the number of variables and to make the maintenance easier. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Longmatch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 14:20:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-definitions-for-one-Variable/m-p/388618#M1154368</guid>
      <dc:creator />
      <dc:date>2013-03-25T14:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple definitions for one Variable.</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-definitions-for-one-Variable/m-p/388619#M1154369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use variables within variables. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vSales2012: sum({&amp;lt;Year={2012}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;vSales2013: sum({&amp;lt;Year={2013}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;vVariance:&amp;nbsp;&amp;nbsp; num($(vSales2013)/$(vSales2012) -1,'#.0%')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way you could redefine vSales2012 or vSales2012 and every variable that uses these variables (like vVariance) will use the new definitions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also pass parameters to variables: &lt;/P&gt;&lt;P&gt;vSales: sum({&amp;lt;Year={&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;$1&lt;/STRONG&gt;&lt;/SPAN&gt;}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;vVariance: $(vSales(&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;2013&lt;/STRONG&gt;&lt;/SPAN&gt;))/$(vSales(&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;2012&lt;/STRONG&gt;&lt;/SPAN&gt;)) -1 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 14:34:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-definitions-for-one-Variable/m-p/388619#M1154369</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-25T14:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple definitions for one Variable.</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-definitions-for-one-Variable/m-p/388620#M1154370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry I might not state my questions clearly. Here is my example. I have a variable named vVariance and its formula are different based upon the data type (continuous data vs discrete data). I do not want to use different variable names for different type of variances. How to implement it? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 14:46:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-definitions-for-one-Variable/m-p/388620#M1154370</guid>
      <dc:creator />
      <dc:date>2013-03-25T14:46:51Z</dc:date>
    </item>
  </channel>
</rss>

