<?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: Replace variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120163#M895442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use a variable with parameter like this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTest&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Cntry = {'IN'}, Prd = &lt;STRONG&gt;{$1}&lt;/STRONG&gt; &amp;gt;}Sales) + sum({&amp;lt;Cat= {'ABC'}&amp;gt;}Amt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then you could use the variable as expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(vTest(1))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;=$(vTest('*'))&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, 03 Aug 2016 10:56:28 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-08-03T10:56:28Z</dc:date>
    <item>
      <title>Replace variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120161#M895438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have variable For Ex:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTest&lt;/P&gt;&lt;P&gt;Value for the above variable is sum({&amp;lt;Cntry = {'IN'}&amp;gt;}Sales) + sum({&amp;lt;Cat= {'ABC'}&amp;gt;}Amt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I need to use that variable in some other place like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; sum({&amp;lt;Cntry = {'IN'},Prd {1}&amp;gt;}Sales) + sum({&amp;lt;Cat= {'ABC'},Prd {1}&amp;gt;}Amt), so here I am adding one more with ""Prd {1}""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have to use only like $(vTest) and need to incude ""Prd {1}""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can we use like above, IF condition should not be used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Priya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120161#M895438</guid>
      <dc:creator>priyarane</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Replace variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120162#M895440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain the scenario?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. do you need the different variables on different sheets?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could always add a variable called say v_Prd and set this to 1 or '*' by using some trigger that works in your particular scenario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 10:51:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120162#M895440</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-08-03T10:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Replace variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120163#M895442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use a variable with parameter like this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vTest&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Cntry = {'IN'}, Prd = &lt;STRONG&gt;{$1}&lt;/STRONG&gt; &amp;gt;}Sales) + sum({&amp;lt;Cat= {'ABC'}&amp;gt;}Amt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then you could use the variable as expression like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(vTest(1))&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;=$(vTest('*'))&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, 03 Aug 2016 10:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120163#M895442</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-08-03T10:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Replace variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120164#M895445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Give a try on the below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare variable &lt;STRONG&gt;vTest&lt;/STRONG&gt; as below:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if($1=1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({&amp;lt;Cntry = {'IN'}&amp;gt;} Sales) + sum({&amp;lt;Cat= {'ABC'}&amp;gt;} Amt)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum({&amp;lt;Cntry = {'IN'},Prd ={'1'}&amp;gt;} Sales) + sum({&amp;lt;Cat= {'ABC'},Prd ={'1'}&amp;gt;} Amt)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can use the above in a expression like below:&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(vTest(1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to use the second expression in the vTest then as below:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(vTest(2))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 11:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120164#M895445</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-08-03T11:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Replace variable</title>
      <link>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120165#M895446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The option given by Adam is a good otion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is also the possibility to use a parametrized variable like:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Cntry = {'IN'}, $1&amp;gt;}Sales) + sum({&amp;lt;Cat= {'ABC'}, $1&amp;gt;}Amt)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And call the variable like:&lt;/P&gt;&lt;P&gt;=$(vTest(Prd={1}))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not tested by I did something similar and the $1 doesn't gives an error when the variable is called just with "=$(vTest)", in case Prd has some null values and you don't want to exclude them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Aug 2016 11:07:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Replace-variable/m-p/1120165#M895446</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-08-03T11:07:09Z</dc:date>
    </item>
  </channel>
</rss>

