<?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: Multiple Exchange Rates, generating in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-Exchange-Rates-generating/m-p/1156328#M918395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this?&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14634790786444529" jivemacro_uid="_14634790786444529"&gt;
&lt;P&gt;//Loads the Currency Rates, their date and the link to their name&lt;/P&gt;
&lt;P&gt;[Rates]:&lt;/P&gt;
&lt;P&gt;LOAD Currency_obj,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExchangeDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExchangeRate&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;[samplerates.qvd]&lt;/P&gt;
&lt;P&gt;(qvd);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Load Currency Names&lt;/P&gt;
&lt;P&gt;[CurrencyNames]:&lt;/P&gt;
&lt;P&gt;MAPPING&lt;/P&gt;
&lt;P&gt;LOAD Currency_obj,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrencyCode&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;[samplecurrencies.qvd]&lt;/P&gt;
&lt;P&gt;(qvd);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Temp_Currency_Rates:&lt;/P&gt;
&lt;P&gt;NoConcatenate load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ApplyMap('CurrencyNames',"Currency_obj") as CurrencyCode,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ExchangeDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If(Previous(Currency_obj)=Currency_obj, Date(previous(ExchangeDate)-0.000001),today()) as ExchangeDateEnd,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ExchangeRate&lt;/P&gt;
&lt;P&gt;resident Rates&lt;/P&gt;
&lt;P&gt;Order BY Currency_obj, ExchangeDate desc;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;drop table Rates;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Rates:&lt;/P&gt;
&lt;P&gt;LOAD CurrencyCode,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Date(ExchangeDate+iterno()-1) as Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ExchangeRate&lt;/P&gt;
&lt;P&gt;RESIDENT Temp_Currency_Rates&lt;/P&gt;
&lt;P&gt;WHILE ExchangeDate+iterno()-1 &amp;lt;= ExchangeDateEnd;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE Temp_Currency_Rates;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="124788" alt="2016-05-17 11_58_10-QlikView x64 - [C__Users_Stefan_Downloads_Currencies_2.qvw].png" class="jive-image image-1" src="/legacyfs/online/124788_2016-05-17 11_58_10-QlikView x64 - [C__Users_Stefan_Downloads_Currencies_2.qvw].png" style="height: 485px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 May 2016 09:58:02 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-05-17T09:58:02Z</dc:date>
    <item>
      <title>Multiple Exchange Rates, generating</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Exchange-Rates-generating/m-p/1156327#M918394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question regarding multiple currencies from one source. Normally I have the source being a database, but for sample documents I stored those into a QVD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed the documentation at &lt;A href="https://community.qlik.com/docs/DOC-3786" target="_blank"&gt;Generating Missing Data In QlikView&lt;/A&gt; which provided to be very useful. However, this doesn't seem to work for multiple currencies. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to do things like reloading tables for each currency, storing and loading them again. But this becomes very messy and I'm fairly sure there is a better alternative. Especially it would be nice if it is done dynamically so that whenever an additional currency pops up, the script doesn't need changing. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically it is the same issue as posted here &lt;A href="https://community.qlikview.com/message/1033902#1033902" title="https://community.qlikview.com/message/1033902#1033902" target="_blank"&gt;Currency exchange issue (daily rates missing so... | Qlik Community&lt;/A&gt; starting from halfway through the discussion. Where multiple exchange rates are an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coen&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/Multiple-Exchange-Rates-generating/m-p/1156327#M918394</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Exchange Rates, generating</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Exchange-Rates-generating/m-p/1156328#M918395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this?&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14634790786444529" jivemacro_uid="_14634790786444529"&gt;
&lt;P&gt;//Loads the Currency Rates, their date and the link to their name&lt;/P&gt;
&lt;P&gt;[Rates]:&lt;/P&gt;
&lt;P&gt;LOAD Currency_obj,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExchangeDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExchangeRate&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;[samplerates.qvd]&lt;/P&gt;
&lt;P&gt;(qvd);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Load Currency Names&lt;/P&gt;
&lt;P&gt;[CurrencyNames]:&lt;/P&gt;
&lt;P&gt;MAPPING&lt;/P&gt;
&lt;P&gt;LOAD Currency_obj,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrencyCode&lt;/P&gt;
&lt;P&gt;FROM&lt;/P&gt;
&lt;P&gt;[samplecurrencies.qvd]&lt;/P&gt;
&lt;P&gt;(qvd);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Temp_Currency_Rates:&lt;/P&gt;
&lt;P&gt;NoConcatenate load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ApplyMap('CurrencyNames',"Currency_obj") as CurrencyCode,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ExchangeDate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If(Previous(Currency_obj)=Currency_obj, Date(previous(ExchangeDate)-0.000001),today()) as ExchangeDateEnd,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ExchangeRate&lt;/P&gt;
&lt;P&gt;resident Rates&lt;/P&gt;
&lt;P&gt;Order BY Currency_obj, ExchangeDate desc;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;drop table Rates;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Rates:&lt;/P&gt;
&lt;P&gt;LOAD CurrencyCode,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Date(ExchangeDate+iterno()-1) as Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ExchangeRate&lt;/P&gt;
&lt;P&gt;RESIDENT Temp_Currency_Rates&lt;/P&gt;
&lt;P&gt;WHILE ExchangeDate+iterno()-1 &amp;lt;= ExchangeDateEnd;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE Temp_Currency_Rates;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="124788" alt="2016-05-17 11_58_10-QlikView x64 - [C__Users_Stefan_Downloads_Currencies_2.qvw].png" class="jive-image image-1" src="/legacyfs/online/124788_2016-05-17 11_58_10-QlikView x64 - [C__Users_Stefan_Downloads_Currencies_2.qvw].png" style="height: 485px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 09:58:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Exchange-Rates-generating/m-p/1156328#M918395</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-17T09:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Exchange Rates, generating</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Exchange-Rates-generating/m-p/1156329#M918396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool, that seems to work to create currencies for all missing dates indeed. The equal to the previous obj is main factor in this I believe. So that it only matches the same currency. Nice, thank you. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 10:25:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Exchange-Rates-generating/m-p/1156329#M918396</guid>
      <dc:creator />
      <dc:date>2016-05-17T10:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Exchange Rates, generating</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Exchange-Rates-generating/m-p/1156330#M918397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, I think it's mostly following&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2960"&gt;Creating a Date Interval from a Single Date&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See also&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4310"&gt;IntervalMatch and Slowly Changing Dimensions&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 May 2016 10:29:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Exchange-Rates-generating/m-p/1156330#M918397</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-17T10:29:53Z</dc:date>
    </item>
  </channel>
</rss>

