<?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 Input Boxes and Variable expansion in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Input-Boxes-and-Variable-expansion/m-p/212721#M66632</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;P&gt;Any chance you can post your app?&lt;/P&gt;&lt;P&gt;It is difficult to fully understand the model without seeing it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jan 2010 10:35:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-15T10:35:05Z</dc:date>
    <item>
      <title>Input Boxes and Variable expansion</title>
      <link>https://community.qlik.com/t5/QlikView/Input-Boxes-and-Variable-expansion/m-p/212720#M66631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to build an application that shows sales value in the currency of the users choice (EUR, GBP, USD) and using 1 of 3 budget conversion rates (last year/Current/Next). I want to preserve table layout and keep the chart expressions simple so have investigated including the code for the currency requirements as variables.&lt;/P&gt;&lt;P&gt;Successfully added an input box to record the variables SpotCurrency and BudgetYear.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-843_sourceID:843" /&gt;&lt;/P&gt;&lt;P&gt;The following code has been added against the variable AmtSpot (which is then used in charts).&lt;/P&gt;&lt;P&gt;code&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;if&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/code&lt;/P&gt;(&lt;B&gt;SpotCurrency&lt;/B&gt;='GBP',(&lt;B&gt;AmtHTInv&lt;/B&gt; * &lt;B&gt;$(#BudExRateGBP)&lt;/B&gt;),(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;SpotCurrency&lt;/B&gt;='EUR',(&lt;B&gt;AmtHTInv&lt;/B&gt;*&lt;B&gt;$(#BudExRateEUR)&lt;/B&gt;),(&lt;B&gt;AmtHTInv&lt;/B&gt;*&lt;B&gt;$(#BudExRateUSD)&lt;/B&gt;)))) &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The following code has been added against each included variable e.g. BudExRateGBP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;if&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;(&lt;B&gt;BudgetYear&lt;/B&gt;='CURRENT',&lt;B&gt;ExRateGBP&lt;/B&gt;,&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;BudgetYear&lt;/B&gt;='NEXT',&lt;B&gt;ExRateGBPNext&lt;/B&gt;,&lt;B&gt;ExRateGBPPrev&lt;/B&gt;)) &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;/code&lt;/P&gt;&lt;P&gt;The actual rates are held in the fields ExRateGBP, ExRateGBPNext and ExRateGBPPrev on a table which is joined to the sales by virtue of the currency code held on the invoice.&lt;/P&gt;&lt;P&gt;All my charts (using expressions like sum($(AmtSpot)) appear to accept changes to the currency correctly but do not alter when I change the Budget Year. Instead the calculation uses the ExRateGBPPrev rate indicating that the conditional expression for BudExRateGBP is not working. Could it be the listed values? (LAST;CURRENT;NEXT) - documentation says to enclose alphanumeric values in quotes but doing this adds the quote marks into the the variable value??&lt;/P&gt;&lt;P&gt;Incidentally, I expect my variable expressions are likely to be improved by using different conditional functions so any advise in that respect would be appreciated.&lt;/P&gt;&lt;H4&gt;&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;many thanks,&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2010 19:33:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Input-Boxes-and-Variable-expansion/m-p/212720#M66631</guid>
      <dc:creator />
      <dc:date>2010-01-14T19:33:06Z</dc:date>
    </item>
    <item>
      <title>Input Boxes and Variable expansion</title>
      <link>https://community.qlik.com/t5/QlikView/Input-Boxes-and-Variable-expansion/m-p/212721#M66632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;P&gt;Any chance you can post your app?&lt;/P&gt;&lt;P&gt;It is difficult to fully understand the model without seeing it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2010 10:35:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Input-Boxes-and-Variable-expansion/m-p/212721#M66632</guid>
      <dc:creator />
      <dc:date>2010-01-15T10:35:05Z</dc:date>
    </item>
    <item>
      <title>Input Boxes and Variable expansion</title>
      <link>https://community.qlik.com/t5/QlikView/Input-Boxes-and-Variable-expansion/m-p/212722#M66633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nigel - sorry for the delay. I've posted my app with a cut down set of data into my files. Can you see this or do I need to post somewhere else on the community pages?&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jan 2010 11:05:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Input-Boxes-and-Variable-expansion/m-p/212722#M66633</guid>
      <dc:creator />
      <dc:date>2010-01-25T11:05:29Z</dc:date>
    </item>
  </channel>
</rss>

