<?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: Variable in expression (challenge !) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-in-expression-challenge/m-p/742020#M264963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose you can use individual variables for the currency and use that variables into the expression where you can use that expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2015 13:50:47 GMT</pubDate>
    <dc:creator>its_anandrjs</dc:creator>
    <dc:date>2015-03-18T13:50:47Z</dc:date>
    <item>
      <title>Variable in expression (challenge !)</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-expression-challenge/m-p/742018#M264961</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;I have a new challenge !&lt;/P&gt;&lt;P&gt;For one project based on exchange rate, I have created 100 variable like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In loading script :&lt;/P&gt;&lt;P&gt;Currency_Table_tmp:&lt;/P&gt;&lt;P&gt;load distinct Currency Resident ExchangeRates;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vRows = NoOfRows('Currency_Table_tmp');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR i = 0 to $(vRows)-1&lt;/P&gt;&lt;P&gt;&amp;nbsp; LET vCurrency = Peek('Currency',$(i),'Currency_Table_tmp');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(len('$(vCurrency)') &amp;gt; 0) then&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set $(vCurrency)_TO_GBP = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Set $(vCurrency)_TO_EUR = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end if;&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One example for a currency AUD:&lt;/P&gt;&lt;P&gt;Variable created : AUD_TO_GBP &amp;amp; AUD_TO_EUR &lt;/P&gt;&lt;P&gt;User can change the rate manually inside the application, that's why I need to create all variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I'm trying to use dynamically the variable into a table :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal is to get that :&lt;/P&gt;&lt;P&gt;Currency (dimension) / Sales&amp;nbsp; GBP (expression) / &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Sales&amp;nbsp; Euro (expression)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AUD / sum(Local Sales) * &lt;SPAN style="font-size: 13.3333330154419px;"&gt;AUD_TO_GBP / &lt;SPAN style="font-size: 13.3333330154419px;"&gt;sum(Sales) * &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;AUD_TO_Euro&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Don't forget &lt;SPAN style="font-size: 13.3333330154419px;"&gt;AUD_TO_GBP is a variable and not a column.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I have tried to do that &lt;SPAN style="font-size: 13.3333330154419px;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=sum(Local Sales) *&amp;nbsp; $('=only(Currency') &amp;amp; '_TO_EUR')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;But Qlikview doesn't understand this : &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$('=only(Currency') &amp;amp; '_TO_EUR') =&amp;gt; the goal is to have the value of this variable (AUD_TO_EUR) and it depends on the currency name in my table&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Any idea ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 13:43:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-expression-challenge/m-p/742018#M264961</guid>
      <dc:creator />
      <dc:date>2015-03-18T13:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in expression (challenge !)</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-expression-challenge/m-p/742019#M264962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;=sum(Local Sales) *&amp;nbsp; $($('=only(Currency') &amp;amp; '_TO_EUR')). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333330154419px;"&gt;If not, please post a qlikview document that demonstrates the problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 13:48:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-expression-challenge/m-p/742019#M264962</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-03-18T13:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in expression (challenge !)</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-expression-challenge/m-p/742020#M264963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose you can use individual variables for the currency and use that variables into the expression where you can use that expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 13:50:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-expression-challenge/m-p/742020#M264963</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2015-03-18T13:50:47Z</dc:date>
    </item>
  </channel>
</rss>

