<?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 Converting Currencies using a database currency table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256613#M1204839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mariana&lt;/P&gt;&lt;P&gt;You will maintain currency exchange rates then manually (inline or in an excel table)?&lt;/P&gt;&lt;P&gt;I would decide on a "standard" currency for all values. Create a table with fields currency and exchange_rate. Exchange rates will be the factor for calculating the currency from your standard currency. In the load statements convert all amounts to the standard currency if needed.&lt;/P&gt;&lt;P&gt;Create a listbox for the currencies, select a single one and then set the general propertiy to "Always one selected value".&lt;/P&gt;&lt;P&gt;In your tables/charts multiply the values with the selected Exchange rate (and show the currency in addition to the listbox if you want).&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jürg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 May 2010 13:59:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-11T13:59:02Z</dc:date>
    <item>
      <title>Converting Currencies using a database currency table</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256612#M1204837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to implement a procedure for converting currencies. I've seen that it's possible to invoke an available web service and get the results in runtime, this is presented in the demo 'What's New in QV9' . Even though this approach has some benefits, for example always having the latest currency information, it has some disadvantages too, need to subscribe and pay this service and hoping that the webservice is always up and available. As a result, I'd like to ask you if it's possible to have this information in a database table and access it in the report? Meaning, after running the script and having the report available, is it possible to have a listbox with the available currencies and after choosing one specific currency, all the values presented in the graphics and tables would be automatically converted for the chosen currency?&lt;/P&gt;&lt;P&gt;Thanks in advance for your time,&lt;/P&gt;&lt;P&gt;Mariana Soares&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 13:19:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256612#M1204837</guid>
      <dc:creator />
      <dc:date>2010-05-11T13:19:55Z</dc:date>
    </item>
    <item>
      <title>Converting Currencies using a database currency table</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256613#M1204839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mariana&lt;/P&gt;&lt;P&gt;You will maintain currency exchange rates then manually (inline or in an excel table)?&lt;/P&gt;&lt;P&gt;I would decide on a "standard" currency for all values. Create a table with fields currency and exchange_rate. Exchange rates will be the factor for calculating the currency from your standard currency. In the load statements convert all amounts to the standard currency if needed.&lt;/P&gt;&lt;P&gt;Create a listbox for the currencies, select a single one and then set the general propertiy to "Always one selected value".&lt;/P&gt;&lt;P&gt;In your tables/charts multiply the values with the selected Exchange rate (and show the currency in addition to the listbox if you want).&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Jürg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 13:59:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256613#M1204839</guid>
      <dc:creator />
      <dc:date>2010-05-11T13:59:02Z</dc:date>
    </item>
    <item>
      <title>Converting Currencies using a database currency table</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256614#M1204841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jürg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="kk"&gt;Thank you very much for your reply. I'll try your solution and I'll give you feedback afterwards.&lt;/DIV&gt;&lt;DIV class="kk"&gt;&lt;BR /&gt;Thanks once again.&lt;/DIV&gt;&lt;DIV class="kk"&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV class="kl" dir="ltr" id=":1ig"&gt;Best regards,&lt;/DIV&gt;&lt;DIV class="kl" dir="ltr"&gt;&lt;/DIV&gt;&lt;DIV class="kl" dir="ltr" id=":1if"&gt;Mariana&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 14:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256614#M1204841</guid>
      <dc:creator />
      <dc:date>2010-05-11T14:20:43Z</dc:date>
    </item>
    <item>
      <title>Converting Currencies using a database currency table</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256615#M1204843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say you have a sales database, where you're selling in many different countries. You also have an exchange rate database, say with an average exchange rate for each day, or however you want to handle it. So your raw data looks like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;RawSales:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Sale, Date, Item, Currency, Amount&lt;BR /&gt;1, 2008-05-10, A, RUB, 3000&lt;BR /&gt;2, 2008-05-20, A, USD, 120&lt;BR /&gt;3, 2008-06-15, B, EUR, 100&lt;BR /&gt;];&lt;BR /&gt;ExchangeRatesRUB: // Our standard currency will be Russian Rubles, but you could pick anything&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Date, Currency, Rate&lt;BR /&gt;2008-05-10, RUB, 1&lt;BR /&gt;2008-05-10, EUR, 15&lt;BR /&gt;2008-05-10, USD, 10&lt;BR /&gt;2008-05-20, RUB, 1&lt;BR /&gt;2008-05-20, EUR, 16&lt;BR /&gt;2008-05-20, USD, 12&lt;BR /&gt;2008-06-15, RUB, 1&lt;BR /&gt;2008-06-15, EUR, 20&lt;BR /&gt;2008-06-15, USD, 10&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;In order to simply select a currency and have QlikView do the rest for you without any complicated formulas, I believe you want to transform these tables into this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Sale Date Item&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;1 2008-05-10 A&lt;BR /&gt;2 2008-05-20 A&lt;BR /&gt;3 2008-06-15 B&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Sale Currency Amount&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;1 3000 RUB&lt;BR /&gt;1 45000 EUR&lt;BR /&gt;1 30000 USD&lt;BR /&gt;2 10 RUB&lt;BR /&gt;2 160 EUR&lt;BR /&gt;2 120 USD&lt;BR /&gt;3 5 RUB&lt;BR /&gt;3 100 EUR&lt;BR /&gt;3 50 USD&lt;/P&gt;&lt;P&gt;You can do that like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Sales:&lt;BR /&gt;LOAD&lt;BR /&gt; Sale&lt;BR /&gt;,Date&lt;BR /&gt;,Item&lt;BR /&gt;RESIDENT RawSales&lt;BR /&gt;;&lt;BR /&gt;SalesAmounts:&lt;BR /&gt;LOAD&lt;BR /&gt; Sale&lt;BR /&gt;,Date as ExchangeRateDate&lt;BR /&gt;,Amount as OriginalAmount&lt;BR /&gt;,Currency as OriginalCurrency&lt;BR /&gt;RESIDENT RawSales&lt;BR /&gt;;&lt;BR /&gt;// Join exchange rate for the original currency on that date&lt;BR /&gt;LEFT JOIN (SalesAmounts)&lt;BR /&gt;LOAD&lt;BR /&gt; Date as ExchangeRateDate&lt;BR /&gt;,Currency as OriginalCurrency&lt;BR /&gt;,Rate as ToRublesRate&lt;BR /&gt;RESIDENT ExchangeRatesRUB&lt;BR /&gt;;&lt;BR /&gt;// Divide to convert to Rubles&lt;BR /&gt;LEFT JOIN (SalesAmounts)&lt;BR /&gt;LOAD&lt;BR /&gt; Sale&lt;BR /&gt;,OriginalAmount/ToRublesRate as Rubles&lt;BR /&gt;RESIDENT SalesAmounts&lt;BR /&gt;;&lt;BR /&gt;// Join exchange rates for ALL currencies on that date. Creates one row for each Sale for each Currency.&lt;BR /&gt;LEFT JOIN (SalesAmounts)&lt;BR /&gt;LOAD&lt;BR /&gt; Date as ExchangeRateDate&lt;BR /&gt;,Currency&lt;BR /&gt;,Rate&lt;BR /&gt;RESIDENT ExchangeRatesRUB&lt;BR /&gt;;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LEFT JOIN (SalesAmounts)&lt;BR /&gt;LOAD&lt;BR /&gt; Sale&lt;BR /&gt;,Currency&lt;BR /&gt;,Rubles*Rate as Amount&lt;BR /&gt;RESIDENT SalesAmounts&lt;BR /&gt;;&lt;BR /&gt;DROP TABLES&lt;BR /&gt; RawSales&lt;BR /&gt;,ExchangeRatesRUB&lt;BR /&gt;;&lt;BR /&gt;DROP FIELDS&lt;BR /&gt; OriginalAmount&lt;BR /&gt;,OriginalCurrency&lt;BR /&gt;,ToRublesRate&lt;BR /&gt;,Rubles&lt;BR /&gt;,Rate&lt;BR /&gt;,ExchangeRateDate&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Stick a list box for Currency on the screen, set it to always one selected value, and I believe everything will calculate correctly from there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 May 2010 22:16:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256615#M1204843</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-05-11T22:16:23Z</dc:date>
    </item>
    <item>
      <title>Converting Currencies using a database currency table</title>
      <link>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256616#M1204844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for both.&lt;/P&gt;&lt;P&gt;I could handle this with your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 08:06:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Converting-Currencies-using-a-database-currency-table/m-p/256616#M1204844</guid>
      <dc:creator />
      <dc:date>2010-05-12T08:06:22Z</dc:date>
    </item>
  </channel>
</rss>

