<?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 Store an expression in a variable, with parameters in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Store-an-expression-in-a-variable-with-parameters/m-p/683739#M474287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm facing an inconvenient issue. I have 4 gauge charts, with the same expression. The only difference between all of them, is a value in a set analysis condition. This value is fixed and different in every chart.&lt;/P&gt;&lt;P&gt;The thing is, if I want to change something in the expression, I have to do it for all the 4 charts; so 4 times the same change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking of storing the expression in a variable, and affecting this variable in my charts. So if I want to change my expression, I do it only once, and it's appplied in the 4 charts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem concerns the fixed value in the set analysis condition. Is there a way to indicate in the expression (stored in the variable) that the value is not fixed, and when I affect the variable in the chart, I give a kind of parameter, which is the value, different in the 4 charts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;1st Chart expression:&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;Sum({$&amp;lt;Category={1}&amp;gt;} Price)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;2nd Chart expression:&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;Sum({$&amp;lt;Category={2}&amp;gt;} Price)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;3rd Chart expression:&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;Sum({$&amp;lt;Category={3}&amp;gt;} Price)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;...&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I store this expression in a variable:&lt;/P&gt;&lt;P&gt;vPrices = Sum({$&amp;lt;Category={1}&amp;gt;} Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you guys have an idea how to indicate my Category value as a dynamic parameter, and affect vPrices for each chart with a different value every time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Sep 2014 13:03:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-24T13:03:17Z</dc:date>
    <item>
      <title>Store an expression in a variable, with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Store-an-expression-in-a-variable-with-parameters/m-p/683739#M474287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm facing an inconvenient issue. I have 4 gauge charts, with the same expression. The only difference between all of them, is a value in a set analysis condition. This value is fixed and different in every chart.&lt;/P&gt;&lt;P&gt;The thing is, if I want to change something in the expression, I have to do it for all the 4 charts; so 4 times the same change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking of storing the expression in a variable, and affecting this variable in my charts. So if I want to change my expression, I do it only once, and it's appplied in the 4 charts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem concerns the fixed value in the set analysis condition. Is there a way to indicate in the expression (stored in the variable) that the value is not fixed, and when I affect the variable in the chart, I give a kind of parameter, which is the value, different in the 4 charts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;1st Chart expression:&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;Sum({$&amp;lt;Category={1}&amp;gt;} Price)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;2nd Chart expression:&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;Sum({$&amp;lt;Category={2}&amp;gt;} Price)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;3rd Chart expression:&lt;/LI&gt;&lt;/UL&gt;&lt;P style="padding-left: 30px;"&gt;Sum({$&amp;lt;Category={3}&amp;gt;} Price)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;...&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I store this expression in a variable:&lt;/P&gt;&lt;P&gt;vPrices = Sum({$&amp;lt;Category={1}&amp;gt;} Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you guys have an idea how to indicate my Category value as a dynamic parameter, and affect vPrices for each chart with a different value every time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 13:03:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-an-expression-in-a-variable-with-parameters/m-p/683739#M474287</guid>
      <dc:creator />
      <dc:date>2014-09-24T13:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Store an expression in a variable, with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Store-an-expression-in-a-variable-with-parameters/m-p/683740#M474288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use the $-sign + a number for any parameter, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPrices:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Category={$1}&amp;gt;} Price)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;expression:&lt;/P&gt;&lt;P&gt;$(vPrices(1))&lt;/P&gt;&lt;P&gt;$(vPrices(2))&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 13:36:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-an-expression-in-a-variable-with-parameters/m-p/683740#M474288</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2014-09-24T13:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Store an expression in a variable, with parameters</title>
      <link>https://community.qlik.com/t5/QlikView/Store-an-expression-in-a-variable-with-parameters/m-p/683741#M474289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, awesome, it perfectly works!&lt;/P&gt;&lt;P&gt;I didn't know that.&lt;/P&gt;&lt;P&gt;Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 13:45:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-an-expression-in-a-variable-with-parameters/m-p/683741#M474289</guid>
      <dc:creator />
      <dc:date>2014-09-24T13:45:38Z</dc:date>
    </item>
  </channel>
</rss>

