<?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: Currency Conversion Issue - Add Rate Where Null and Calculate in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Currency-Conversion-Issue-Add-Rate-Where-Null-and-Calculate/m-p/392996#M1166868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All that you did in calculated dimension remains there.&lt;/P&gt;&lt;P&gt;In your expression you use &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;field&lt;/STRONG&gt;&lt;/SPAN&gt; RATE_MULT. You can't refer to dimensions by label.&lt;/P&gt;&lt;P&gt;Use column(N) function or just add if statement in your expression:&lt;/P&gt;&lt;P&gt;=([Unit Price Paid]*&lt;STRONG&gt;if(isnull(RATE_MULT),1,RATE_MULT)&lt;/STRONG&gt;)*[Quantity, lbs]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, consider replace nulls with 1 in script as you don't use them:&lt;/P&gt;&lt;P&gt;LOAD EFFDT,&lt;/P&gt;&lt;P&gt;Month(EFFDT)&amp;amp;'-'&amp;amp;Year(EFFDT) as MonthYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM_CUR as [Currency Paid],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;if(isnull(RATE_MULT),1,RATE_MULT)&lt;/STRONG&gt; as RATE_MULT&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Currency Table.xls]&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Sep 2012 05:18:50 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2012-09-11T05:18:50Z</dc:date>
    <item>
      <title>Currency Conversion Issue - Add Rate Where Null and Calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Currency-Conversion-Issue-Add-Rate-Where-Null-and-Calculate/m-p/392995#M1166867</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 am trying to convert Unit Price into USD using the RATE_MULT field. My conversion table does not have a value for USD prior to April 2012. Where this value is null in the RATE_MULT column, I have replaced it with Num#(1) using Calculated Dimension. The problem comes about then when I try to calculate an expression (USD Amount) off of the calculated dimension. The calculation does not recognize the new (1), and only a null value is returned in USD Amount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps the synthetic key is the issue. I had to join on MonthYear as well as Currency Paid due to the dates not being exact matches.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the file here. Thanks for your assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 21:46:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Currency-Conversion-Issue-Add-Rate-Where-Null-and-Calculate/m-p/392995#M1166867</guid>
      <dc:creator />
      <dc:date>2012-09-10T21:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion Issue - Add Rate Where Null and Calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Currency-Conversion-Issue-Add-Rate-Where-Null-and-Calculate/m-p/392996#M1166868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All that you did in calculated dimension remains there.&lt;/P&gt;&lt;P&gt;In your expression you use &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;field&lt;/STRONG&gt;&lt;/SPAN&gt; RATE_MULT. You can't refer to dimensions by label.&lt;/P&gt;&lt;P&gt;Use column(N) function or just add if statement in your expression:&lt;/P&gt;&lt;P&gt;=([Unit Price Paid]*&lt;STRONG&gt;if(isnull(RATE_MULT),1,RATE_MULT)&lt;/STRONG&gt;)*[Quantity, lbs]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, consider replace nulls with 1 in script as you don't use them:&lt;/P&gt;&lt;P&gt;LOAD EFFDT,&lt;/P&gt;&lt;P&gt;Month(EFFDT)&amp;amp;'-'&amp;amp;Year(EFFDT) as MonthYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM_CUR as [Currency Paid],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;if(isnull(RATE_MULT),1,RATE_MULT)&lt;/STRONG&gt; as RATE_MULT&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Currency Table.xls]&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Sheet1$);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 05:18:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Currency-Conversion-Issue-Add-Rate-Where-Null-and-Calculate/m-p/392996#M1166868</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-11T05:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Currency Conversion Issue - Add Rate Where Null and Calculate</title>
      <link>https://community.qlik.com/t5/QlikView/Currency-Conversion-Issue-Add-Rate-Where-Null-and-Calculate/m-p/392997#M1166869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression statement worked, Thank You!&amp;nbsp; I will also try the load script method, but this is enough to keep me moving forward.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 13:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Currency-Conversion-Issue-Add-Rate-Where-Null-and-Calculate/m-p/392997#M1166869</guid>
      <dc:creator />
      <dc:date>2012-09-11T13:22:22Z</dc:date>
    </item>
  </channel>
</rss>

