<?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 Currency Conversion Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Currency-Conversion-Expression/m-p/276978#M497753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Werner,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the best solution might bedepending on your data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the Exchange rate data is associated to the field [FX Code From], you could maybe use a simpler expression like&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;[Version]={'ACTUAL'},[Location Level 2]={'OA'}&amp;gt;}&amp;nbsp; _Amount / [FX Rate])&lt;/P&gt;&lt;P&gt;but anyway, a change to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_Amount / only({&amp;lt;[FX Code To]=’USD’&amp;gt;} [FX Rate])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should / could work to use a dynamic exchange rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Aug 2011 18:05:14 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2011-08-16T18:05:14Z</dc:date>
    <item>
      <title>Currency Conversion Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Currency-Conversion-Expression/m-p/276977#M497752</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 have a currency conversion expression as per below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Version]={'ACTUAL'},[Location Level 2]={'OA'}&amp;gt;}&amp;nbsp; IF([FX Code From]='USD',_Amount,&amp;nbsp; IF([FX Code To]='ZAR',_Amount / 6.92,_Amount / [FX Rate])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is to replace the 6.92 dynamically with the [FX Code To] = USD, FX Rate in order to use the current exchange rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression works "perfectly" except for the case that the rate for that condition is hard coded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I modify the expression to use the "USD FX Code To" rate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any idea what the syntax should look like to replace the 6.92? Something like _Amount / {&amp;lt;[FX Code To]=’USD’&amp;gt;} [FX Rate] ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd appreciate any help or suggestions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Werner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2011 17:34:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Currency-Conversion-Expression/m-p/276977#M497752</guid>
      <dc:creator />
      <dc:date>2011-08-16T17:34:19Z</dc:date>
    </item>
    <item>
      <title>Currency Conversion Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Currency-Conversion-Expression/m-p/276978#M497753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Werner,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the best solution might bedepending on your data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the Exchange rate data is associated to the field [FX Code From], you could maybe use a simpler expression like&lt;/P&gt;&lt;P&gt;=sum({&amp;lt;[Version]={'ACTUAL'},[Location Level 2]={'OA'}&amp;gt;}&amp;nbsp; _Amount / [FX Rate])&lt;/P&gt;&lt;P&gt;but anyway, a change to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_Amount / only({&amp;lt;[FX Code To]=’USD’&amp;gt;} [FX Rate])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should / could work to use a dynamic exchange rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2011 18:05:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Currency-Conversion-Expression/m-p/276978#M497753</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-16T18:05:14Z</dc:date>
    </item>
    <item>
      <title>Currency Conversion Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Currency-Conversion-Expression/m-p/276979#M497754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;Thank you Stefan, I really appreciate your help and advice. &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;I'm new to QlikView, set analysis etc...I have to start supporting an existing QlikView model.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;I’m getting a “error in expression” when I use the expression as per below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;sum({&amp;lt;[Version]={'ACTUAL'},[Location Level 2]={'OA'}&amp;gt;} &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;IF([FX Code From]='USD',_Amount, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;IF([FX Code To]='ZAR',_Amount / Only({&amp;lt;[FX Code To]=’USD’&amp;gt;} [FX Rate]),_Amount / [FX Rate])))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;Is there something else I have to add to the only statement?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;Thanks again.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 6pt;"&gt;&lt;SPAN style="font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;Werner&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2011 19:53:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Currency-Conversion-Expression/m-p/276979#M497754</guid>
      <dc:creator />
      <dc:date>2011-08-16T19:53:53Z</dc:date>
    </item>
    <item>
      <title>Currency Conversion Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Currency-Conversion-Expression/m-p/276980#M497755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah yes, of course, my fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not allowed to use a aggregation function inside an aggregation without using the TOTAL qualifier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if you want this qualifier here (it will disregard the charts dimension).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you put the&amp;nbsp; [FX Code To]=’USD’ inside the first set expression? Or don't you want to convert to USD in all cases?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could post your data model (or an relevant part of it ) or a sample app here (upload available in advanced editor), this may make help a little easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Aug 2011 20:28:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Currency-Conversion-Expression/m-p/276980#M497755</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-16T20:28:56Z</dc:date>
    </item>
  </channel>
</rss>

